[packages/mixxx] - added libdir patch to honour libdir setting (place plugins in appropriate lib* depending on their

qboosh qboosh at pld-linux.org
Sun Oct 21 09:25:40 CEST 2018


commit a932171d678de9c524417c7cfe49a035e99ece84
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Oct 21 09:29:17 2018 +0200

    - added libdir patch to honour libdir setting (place plugins in appropriate lib* depending on their ABI); release 6

 mixxx-libdir.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
 mixxx.spec         |  8 ++++++--
 2 files changed, 50 insertions(+), 2 deletions(-)
---
diff --git a/mixxx.spec b/mixxx.spec
index be5a2e6..37bad3d 100644
--- a/mixxx.spec
+++ b/mixxx.spec
@@ -3,12 +3,13 @@ Summary(hu.UTF-8):	Mixxx - DJ program
 Summary(pl.UTF-8):	Mixxx - narzędzie dla DJ-ów
 Name:		mixxx
 Version:	1.11.0
-Release:	5
+Release:	6
 License:	GPL v2+
 Group:		X11/Applications/Multimedia
 Source0:	http://downloads.mixxx.org/mixxx-%{version}/%{name}-%{version}-src.tar.gz
 # Source0-md5:	89ee8ba60824919d8dd1194287bda259
 Patch0:		desktop.patch
+Patch1:		%{name}-libdir.patch
 URL:		http://mixxx.org/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	Qt3Support-devel >= 4.6
@@ -84,6 +85,7 @@ Podstawowe skórki dla programu Mixxx.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 export CXXFLAGS="%{rpmcxxflags}"
@@ -91,6 +93,7 @@ export CCFLAGS="%{rpmcflags}"
 export CXX="%{__cxx}"
 export QMAKE_CXX="%{__cxx}"
 %scons \
+	libdir=%{_libdir} \
 	faad=1 \
 	wv=1
 # ffmpeg=1 is "NOT-WORKING"
@@ -104,7 +107,8 @@ export CCFLAGS="%{rpmcflags}"
 export CXX="%{__cxx}"
 export QMAKE_CXX="%{__cxx}"
 %scons install \
-	install_root=$RPM_BUILD_ROOT%{_prefix}
+	install_root=$RPM_BUILD_ROOT \
+	libdir=%{_libdir}
 
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mixxx
 
diff --git a/mixxx-libdir.patch b/mixxx-libdir.patch
new file mode 100644
index 0000000..2acb8ec
--- /dev/null
+++ b/mixxx-libdir.patch
@@ -0,0 +1,44 @@
+--- mixxx-1.11.0/build/depends.py.orig	2013-05-09 01:20:26.000000000 +0200
++++ mixxx-1.11.0/build/depends.py	2018-10-21 08:31:44.564677062 +0200
+@@ -898,9 +898,11 @@
+         # RESOURCE_PATH that covers Win and OSX too:
+         if build.platform_is_linux or build.platform_is_bsd:
+             prefix = SCons.ARGUMENTS.get('prefix', '/usr/local')
+-            share_path = os.path.join(prefix, 'share/mixxx')
++            datadir = SCons.ARGUMENTS.get('datadir', os.path.join(prefix, 'share'))
++            share_path = os.path.join(datadir, 'mixxx')
+             build.env.Append(CPPDEFINES=('UNIX_SHARE_PATH', r'\"%s\"' % share_path))
+-            lib_path = os.path.join(prefix, 'lib/mixxx')
++            libdir = SCons.ARGUMENTS.get('libdir', os.path.join(prefix, 'lib'))
++            lib_path = os.path.join(libdir, 'mixxx')
+             build.env.Append(CPPDEFINES=('UNIX_LIB_PATH', r'\"%s\"' % lib_path))
+ 
+     def depends(self, build):
+--- mixxx-1.11.0/src/SConscript.orig	2013-05-09 01:20:26.000000000 +0200
++++ mixxx-1.11.0/src/SConscript	2018-10-21 08:35:27.378007853 +0200
+@@ -237,6 +237,9 @@
+ 
+ if build.platform_is_linux or build.platform_is_bsd:
+         flags['prefix'] = ARGUMENTS.get('prefix', '/usr/local')
++        flags['datadir'] = ARGUMENTS.get('datadir', os.path.join(flags['prefix'], 'share'))
++        flags['bindir'] = ARGUMENTS.get('bindir', os.path.join(flags['prefix'], 'bin'))
++        flags['libdir'] = ARGUMENTS.get('libdir', os.path.join(flags['prefix'], 'lib'))
+         if not os.path.exists(flags['prefix']):
+                 print "Error: Prefix path does not exist!"
+                 Exit(1)
+@@ -245,11 +248,11 @@
+                 #Basically, the flags['prefix'] is compiled into strings in Mixxx, whereas the install_root is not. When you're
+                 #building a Debian package, pbuilder wants to install Mixxx to a temporary directory, but you still need
+                 #the compiled-in strings using /usr as the prefix. That's why we have install_root and flags['prefix'].
+-                install_root = ARGUMENTS.get('install_root', flags['prefix'])
++                install_root = ARGUMENTS.get('install_root', '')
+                 print "Install root: " + install_root
+-                unix_share_path = os.path.join(install_root, 'share')
+-                unix_bin_path = os.path.join(install_root, 'bin')
+-                unix_lib_path = os.path.join(install_root, 'lib')
++                unix_share_path = install_root + flags['datadir']
++                unix_bin_path = install_root + flags['bindir']
++                unix_lib_path = install_root + flags['libdir']
+ 
+                 binary = env.Install(unix_bin_path, binary_files)
+                 resource = env.Install(os.path.join(unix_share_path, 'mixxx'), resource_files)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mixxx.git/commitdiff/a932171d678de9c524417c7cfe49a035e99ece84



More information about the pld-cvs-commit mailing list