mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
f5fa5fa4d6
* pkgs: refactor needless quoting of homepage meta attribute A lot of packages are needlessly quoting the homepage meta attribute (about 1400, 22%), this commit refactors all of those instances. * pkgs: Fixing some links that were wrongfully unquoted in the previous commit * Fixed some instances
58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
{ stdenv, fetchurl, unzip, cmake, /*jdk,*/ alsaLib }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "portmidi-${version}";
|
|
version = "217";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/portmedia/portmidi-src-${version}.zip";
|
|
sha256 = "03rfsk7z6rdahq2ihy5k13qjzgx757f75yqka88v3gc0pn9ais88";
|
|
};
|
|
|
|
cmakeFlags = let
|
|
#base = "${jdk}/jre/lib/${jdk.architecture}";
|
|
in [
|
|
"-DPORTMIDI_ENABLE_JAVA=0"
|
|
/* TODO: Fix Java support.
|
|
"-DJAVA_AWT_LIBRARY=${base}/libawt.so"
|
|
"-DJAVA_JVM_LIBRARY=${base}/server/libjvm.so"
|
|
*/
|
|
"-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release"
|
|
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release"
|
|
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release"
|
|
];
|
|
|
|
# XXX: This is to deactivate Java support.
|
|
patches = stdenv.lib.singleton (fetchurl rec {
|
|
url = "https://raw.github.com/Rogentos/argent-gentoo/master/media-libs/"
|
|
+ "portmidi/files/portmidi-217-cmake-libdir-java-opts.patch";
|
|
sha256 = "1jbjwan61iqq9fqfpq2a4fd30k3clg7a6j0gfgsw87r8c76kqf6h";
|
|
});
|
|
|
|
postPatch = ''
|
|
sed -i -e 's|/usr/local/|'"$out"'|' -e 's|/usr/share/|'"$out"'/share/|' \
|
|
pm_common/CMakeLists.txt pm_dylib/CMakeLists.txt pm_java/CMakeLists.txt
|
|
sed -i \
|
|
-e 's|-classpath .|-classpath '"$(pwd)"'/pm_java|' \
|
|
-e 's|pmdefaults/|'"$(pwd)"'/pm_java/&|g' \
|
|
-e 's|jportmidi/|'"$(pwd)"'/pm_java/&|g' \
|
|
-e 's/WORKING_DIRECTORY pm_java//' \
|
|
pm_java/CMakeLists.txt
|
|
'';
|
|
|
|
postInstall = ''
|
|
ln -s libportmidi.so "$out/lib/libporttime.so"
|
|
'';
|
|
|
|
buildInputs = [ unzip cmake /*jdk*/ alsaLib ];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
meta = {
|
|
homepage = http://portmedia.sourceforge.net/portmidi/;
|
|
description = "Platform independent library for MIDI I/O";
|
|
license = stdenv.lib.licenses.mit;
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|