diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-29 09:52:04 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-29 10:06:09 +0700 |
commit | 66be0293ff581cd17b07f19a83364980c7d1fd4c (patch) | |
tree | 65c6924209e338b50947b8147ecbf70e1f1a2e0a /development/wxHexEditor | |
parent | 44848e30048cd32c585431d2b1def91d03549696 (diff) |
development/wxHexEditor: Fix build on i586.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/wxHexEditor')
-rw-r--r-- | development/wxHexEditor/224.patch | 36 | ||||
-rw-r--r-- | development/wxHexEditor/wxHexEditor.SlackBuild | 10 | ||||
-rw-r--r-- | development/wxHexEditor/wxHexEditor.desktop | 12 |
3 files changed, 56 insertions, 2 deletions
diff --git a/development/wxHexEditor/224.patch b/development/wxHexEditor/224.patch new file mode 100644 index 0000000000..4c1fb29ca7 --- /dev/null +++ b/development/wxHexEditor/224.patch @@ -0,0 +1,36 @@ +From 42f7f35d893a6bfff89c5da05cb497ddabef1a2a Mon Sep 17 00:00:00 2001 +From: Francesco Abbate <francesco.bbt@gmail.com> +Date: Thu, 27 Jun 2024 18:33:13 +0200 +Subject: [PATCH] fix problem with __m128i undefined on ARM + +--- + src/HexDialogs.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/HexDialogs.cpp b/src/HexDialogs.cpp +index 80af2da..8eecdc8 100644 +--- a/src/HexDialogs.cpp ++++ b/src/HexDialogs.cpp +@@ -1311,17 +1311,22 @@ void FindDialog::OnFindAll( bool internal ) { + //Returns indice of first found if used with ( options & SEARCH_FINDALL) ret_ptr return vector pointer filled with locations at buffer + //WARNING! THIS FUNCTION WILL CHANGE BFR and/or SEARCH strings if SEARCH_MATCHCASE not selected as an option! + inline int FindDialog::SearchAtBuffer( char *bfr, int bfr_size, char* search, int search_size, unsigned options, std::vector<int> *ret_ptr ) { ++#ifdef __SSE2__ + static const int REG_SZ = sizeof(__m128i); + + char internal_array[REG_SZ]; ++#endif + + if( bfr_size < search_size ) + return -1; ++ ++#ifdef __SSE2__ + if(bfr_size < REG_SZ) { + memset(&internal_array[0], 0, sizeof(internal_array)); + memcpy(&internal_array[0], bfr, bfr_size); + bfr = &internal_array[0]; + } ++#endif + + ///SEARCH_FINDALL operation supersedes SEARCH_BACKWARDS and SEARCH_WRAPAROUND + if(options & SEARCH_FINDALL) diff --git a/development/wxHexEditor/wxHexEditor.SlackBuild b/development/wxHexEditor/wxHexEditor.SlackBuild index 037c3ca2ad..132f2376d5 100644 --- a/development/wxHexEditor/wxHexEditor.SlackBuild +++ b/development/wxHexEditor/wxHexEditor.SlackBuild @@ -31,7 +31,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wxHexEditor VERSION=${VERSION:-20231108_f439d8f} SRCVERSION=f439d8f3bfbccbf7f7ec587b548a7d7421978b2f -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -81,6 +81,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Fix build on i586 and ARM +patch -p1 < $CWD/224.patch + make PREFIX=/usr OPTFLAGS="$SLKCFLAGS" HOST=$ARCH-slackware-linux make install PREFIX=$PKG/usr @@ -88,9 +91,12 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp docs/Change.log LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +install -m644 docs/Change.log LICENSE $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +mkdir -p $PKG/usr/share/applications +cp $CWD/wxHexEditor.desktop $PKG/usr/share/applications + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh diff --git a/development/wxHexEditor/wxHexEditor.desktop b/development/wxHexEditor/wxHexEditor.desktop new file mode 100644 index 0000000000..cc18c6d9d0 --- /dev/null +++ b/development/wxHexEditor/wxHexEditor.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Name=wxHexEditor +GenericName=wxHexEditor +Comment=A hex editor for huge files and devices +Exec=wxHexEditor %F +Icon=wxHexEditor +Terminal=false +Type=Application +Categories=Utility;TextEditor; +Keywords=disk;drive;volume;harddisk;hdd;disc;cdrom;dvd;partition;iso;image;backup;restore;editor; + |