summaryrefslogtreecommitdiff
path: root/audio/portmidi/portmidi.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/portmidi/portmidi.SlackBuild')
-rw-r--r--audio/portmidi/portmidi.SlackBuild28
1 files changed, 13 insertions, 15 deletions
diff --git a/audio/portmidi/portmidi.SlackBuild b/audio/portmidi/portmidi.SlackBuild
index e83e8efce6..0ca202fe3a 100644
--- a/audio/portmidi/portmidi.SlackBuild
+++ b/audio/portmidi/portmidi.SlackBuild
@@ -22,9 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified by SlackBuilds.org
+
PRGNAM=portmidi
VERSION=${VERSION:-200}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
@@ -75,41 +77,37 @@ find . \
# Fix the libjvm.so path. This is *really* only needed on x86_64, but fixing
# it on both arches looks prettier :-) --rworkman
sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%" $CWD/fixup_java_path.diff | patch --verbose -p1
+# cmake install dir & 64 bit fixes
+patch -p1 -i $CWD/portmidi-cmake.patch
cmake . \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_CACHEFILE_DIR=$PKG \
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="$PKG/usr/lib$LIBDIRSUFFIX" \
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="$PKG/usr/lib$LIBDIRSUFFIX" \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$PKG/usr/bin \
-DJAVA_AWT_INCLUDE_PATH="/usr/lib$LIBDIRSUFFIX/java/include" \
-DJAVA_INCLUDE_PATH="/usr/lib$LIBDIRSUFFIX/java/include" \
-DJAVA_INCLUDE_PATH2="/usr/lib$LIBDIRSUFFIX/java/include/linux" \
-DJAVA_JVM_LIBRARY="/usr/lib$LIBDIRSUFFIX/libjvm.so"
-patch --verbose -p1 < $CWD/portmidi-shared.diff
-
-# Fixup for hardcoded usr/local
-find . \( -name cmake_install.cmake -o -name CMakeLists.txt -o -name Makefile \) \
- -exec sed -i 's%/local%%g' '{}' \;
+make \
+ CFLAGS="-fPIC" \
+ PMFLAGS="-DNEWBUFFER" \
+ all
-make all CFLAGS="-fPIC" PMFLAGS="-DNEWBUFFER"
make install DESTDIR=$PKG
-rm -f $PKG/usr/lib/libportmidi_s.a
+
+rm -f $PKG/usr/lib$LIBDIRSUFFIX/libportmidi_s.a
# I think this may cause problems unless it's renamed
mv $PKG/usr/bin/test $PKG/usr/bin/portmiditest
-# Pinched from fc spec
install -m 0644 -D pm_common/pmutil.h $PKG/usr/include
-mkdir -p $PKG/usr/share/applications
install -m 0644 -D $CWD/pmdefaults.desktop $PKG/usr/share/applications/pmdefaults.desktop
-mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
install -m 0644 -D pm_java/pmdefaults/pmdefaults-icon.png \
- $PKG/usr/share/icons/hicolor/128x128/apps/pmdefaults-icon.png
+ $PKG/usr/share/icons/hicolor/128x128/apps/pmdefaults-icon.png
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true