summaryrefslogtreecommitdiff
path: root/system/capstone/capstone.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/capstone/capstone.SlackBuild')
-rw-r--r--system/capstone/capstone.SlackBuild23
1 files changed, 18 insertions, 5 deletions
diff --git a/system/capstone/capstone.SlackBuild b/system/capstone/capstone.SlackBuild
index e4fe1bf7db..faf4fa3070 100644
--- a/system/capstone/capstone.SlackBuild
+++ b/system/capstone/capstone.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=capstone
-VERSION=${VERSION:-3.0.5_rc2}
+VERSION=${VERSION:-4.0_alpha5}
SRCVER=$(echo $VERSION | tr _ -)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,23 +70,28 @@ 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 {} \;
-sed -i -e "s/DESTINATION lib/DESTINATION lib$LIBDIRSUFFIX/" CMakeLists.txt
+# capstone lacks 64bit library location support for cmake. this patch
+# will re-implement it. version 4.0-alpha5
+patch -p0 --verbose < $CWD/CMakeLists.txt.patch
mkdir -p build
cd build
- cmake \
+
+cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCAPSTONE_ARM_SUPPORT=1 \
-DCAPSTONE_ARM64_SUPPORT=1 \
+ -DCAPSTONE_M68K_SUPPORT=1 \
-DCAPSTONE_MIPS_SUPPORT=1 \
-DCAPSTONE_PPC_SUPPORT=1 \
-DCAPSTONE_SPARC_SUPPORT=1 \
-DCAPSTONE_SYSZ_SUPPORT=1 \
- -DCAPSTONE_XCORE_SUPPORT=1 \
+ -DCAPSTONE_TMS320C64X_SUPPORT=1 \
-DCAPSTONE_X86_SUPPORT=1 \
-DCAPSTONE_X86_ATT_DISABLE=1 \
+ -DCAPSTONE_XCORE_SUPPORT=1 \
-DCAPSTONE_BUILD_STATIC=0 \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
@@ -96,8 +101,16 @@ cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# pkg-config (PKG_CONFIG_PATH environment variable)
+# to generate .pc file do: $ python setup.py build
+# inside bindings/python
+mkdir -p $PKG/usr/share/pkgconfig
+sed -e "s|%VERSION%|$VERSION|" -e "s|%LIBDIRSUFFIX%|$LIBDIRSUFFIX|" \
+ < $CWD/capstone.pc.in \
+ > $PKG/usr/share/pkgconfig/capstone.pc
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COMPILE* LICENSE* README TODO RELEASE_NOTES HACK.TXT ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COMPILE* LICENSE* README.md TODO RELEASE_NOTES HACK.TXT ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install