commit 2508a369bc33f6f95c45d048d1505f1a7c682995
Author: Jakub Bogusz <[email protected]>
Date:   Fri Apr 26 16:55:53 2019 +0200

    - updated to 1.8.2
    - updated pc patch
    - added jni patch (fix librubberband-jni.so soname, install conditionally 
to avoid build failure without java)

 rubberband-jni.patch | 28 ++++++++++++++++++++++++++++
 rubberband-pc.patch  | 10 +++++-----
 rubberband.spec      | 44 +++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 72 insertions(+), 10 deletions(-)
---
diff --git a/rubberband.spec b/rubberband.spec
index 072da22..fce7c8c 100644
--- a/rubberband.spec
+++ b/rubberband.spec
@@ -1,15 +1,21 @@
+#
+# Conditional build:
+%bcond_without java    # JNI library
+
 Summary:       An audio time-stretching and pitch-shifting library and utility 
program
 Summary(pl.UTF-8):     Biblioteka i narzędzie do rozciągania i harmonizowania 
dźwięku
 Name:          rubberband
-Version:       1.8.1
-Release:       2
+Version:       1.8.2
+Release:       1
 License:       GPL v2+
 Group:         Applications/Sound
-Source0:       
http://code.breakfastquay.com/attachments/download/34/%{name}-%{version}.tar.bz2
-# Source0-md5: 6c2b4e18a714bcc297d0db81a10f9348
+Source0:       
https://breakfastquay.com/files/releases/%{name}-%{version}.tar.bz2
+# Source0-md5: db0ecb4f1a647bdaf7e43ef2ca2f7883
 Patch0:                %{name}-pc.patch
+Patch1:                %{name}-jni.patch
 URL:           http://www.breakfastquay.com/rubberband/
 BuildRequires: fftw3-devel >= 3
+%{?with_jni:BuildRequires:     jdk}
 BuildRequires: ladspa-devel
 BuildRequires: libsamplerate-devel
 BuildRequires: libsndfile-devel
@@ -63,6 +69,18 @@ Static rubberband library.
 %description static -l pl.UTF-8
 Statyczna biblioteka rubberband.
 
+%package -n java-rubberband
+Summary:       Java JNI interface for rubberband
+Summary(pl.UTF-8):     Interfejs Javy JNI do rubberband
+Group:         Libraries/Java
+Requires:      jre
+
+%description -n java-rubberband
+Java JNI interface for rubberband.
+
+%description -n java-rubberband -l pl.UTF-8
+Interfejs Javy JNI do rubberband.
+
 %package -n ladspa-rubberband-plugins
 Summary:       rubberband LADSPA plugin
 Summary(pl.UTF-8):     Wtyczka LADSPA rubberband
@@ -90,10 +108,11 @@ Wtyczka Vamp rubberband.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %configure
-%{__make} \
+%{__make} all %{?with_java:jni} \
        INSTALL_LIBDIR="%{_libdir}" \
        INSTALL_VAMPDIR="%{_libdir}/vamp" \
        INSTALL_LADSPADIR="%{_libdir}/ladspa"
@@ -108,12 +127,20 @@ rm -rf $RPM_BUILD_ROOT
        INSTALL_LADSPADIR="%{_libdir}/ladspa" \
        INSTALL_PKGDIR="%{_pkgconfigdir}"
 
+%if %{with java}
+install -d $RPM_BUILD_ROOT%{_javadir}
+cp -p lib/rubberband.jar $RPM_BUILD_ROOT%{_javadir}
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
+%post  -n java-rubberband -p /sbin/ldconfig
+%postun        -n java-rubberband -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc CHANGELOG README.txt
@@ -134,6 +161,13 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/librubberband.a
 
+%if %{with java}
+%files -n java-rubberband
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/librubberband-jni.so
+%{_javadir}/rubberband.jar
+%endif
+
 %files -n ladspa-rubberband-plugins
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/ladspa/ladspa-rubberband.so
diff --git a/rubberband-jni.patch b/rubberband-jni.patch
new file mode 100644
index 0000000..df6c26c
--- /dev/null
+++ b/rubberband-jni.patch
@@ -0,0 +1,28 @@
+--- rubberband-1.8.2/Makefile.in.orig  2019-04-26 16:04:47.502018628 +0200
++++ rubberband-1.8.2/Makefile.in       2019-04-26 16:42:07.616549552 +0200
+@@ -34,6 +34,7 @@
+ DYNAMIC_FULL_VERSION  := 2.1.1
+ DYNAMIC_ABI_VERSION   := 2
+ DYNAMIC_LDFLAGS               := -shared -Wl,-Bsymbolic 
-Wl,-soname=$(LIBNAME)$(DYNAMIC_EXTENSION).$(DYNAMIC_ABI_VERSION)
++JNI_LDFLAGS           := -shared -Wl,-Bsymbolic 
-Wl,-soname=$(JNINAME)$(DYNAMIC_EXTENSION)
+ VAMP_LDFLAGS          := -shared -Wl,-Bsymbolic 
-Wl,--version-script=vamp/vamp-plugin.map
+ LADSPA_LDFLAGS                := -shared -Wl,-Bsymbolic 
-Wl,--version-script=ladspa/ladspa-plugin.map
+ 
+@@ -149,7 +150,7 @@
+       $(CXX) -c $(JNI_CXXFLAGS) $(CXXFLAGS) $^ -o $@
+ 
+ $(JNI_TARGET):        $(LIBRARY_OBJECTS) $(JNI_OBJECT)
+-      $(CXX) $(DYNAMIC_LDFLAGS) $^ -o $@ $(LIBRARY_LIBS) $(LDFLAGS)
++      $(CXX) $(JNI_LDFLAGS) $^ -o $@ $(LIBRARY_LIBS) $(LDFLAGS)
+ 
+ $(JAR_TARGET):        $(JAVA_SOURCE)
+       $(JAVAC) $^
+@@ -183,7 +184,7 @@
+       cp $(DYNAMIC_TARGET) 
$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)$(DYNAMIC_EXTENSION).$(DYNAMIC_FULL_VERSION)
+       ln -s $(LIBNAME)$(DYNAMIC_EXTENSION).$(DYNAMIC_FULL_VERSION) 
$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)$(DYNAMIC_EXTENSION).$(DYNAMIC_ABI_VERSION)
+       ln -s $(LIBNAME)$(DYNAMIC_EXTENSION).$(DYNAMIC_FULL_VERSION) 
$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)$(DYNAMIC_EXTENSION)
+-      cp -f $(JNI_TARGET) 
$(DESTDIR)$(INSTALL_LIBDIR)/$(JNINAME)$(DYNAMIC_EXTENSION)
++      if test -f $(JNI_TARGET) ; then cp -f $(JNI_TARGET) 
$(DESTDIR)$(INSTALL_LIBDIR)/$(JNINAME)$(DYNAMIC_EXTENSION) ; fi
+       cp $(VAMP_TARGET) $(DESTDIR)$(INSTALL_VAMPDIR)
+       cp vamp/vamp-rubberband.cat $(DESTDIR)$(INSTALL_VAMPDIR)
+       cp $(LADSPA_TARGET) $(DESTDIR)$(INSTALL_LADSPADIR)
diff --git a/rubberband-pc.patch b/rubberband-pc.patch
index 263935f..62e43d8 100644
--- a/rubberband-pc.patch
+++ b/rubberband-pc.patch
@@ -8,14 +8,14 @@
  includedir=${prefix}/include
  
  Name: rubberband
---- rubberband-1.8.1/Makefile.in.orig  2012-10-28 11:30:09.000000000 +0100
-+++ rubberband-1.8.1/Makefile.in       2016-02-21 21:57:23.866482117 +0100
-@@ -158,7 +158,7 @@
+--- rubberband-1.8.2/Makefile.in.orig  2019-04-26 05:48:08.645791967 +0200
++++ rubberband-1.8.2/Makefile.in       2019-04-26 05:50:46.468270303 +0200
+@@ -189,7 +189,7 @@
        cp $(LADSPA_TARGET) $(DESTDIR)$(INSTALL_LADSPADIR)
        cp ladspa/ladspa-rubberband.cat $(DESTDIR)$(INSTALL_LADSPADIR)
        cp ladspa/ladspa-rubberband.rdf $(DESTDIR)$(INSTALL_LRDFDIR)
--      sed "s,%PREFIX%,@prefix@," rubberband.pc.in \
-+      sed "s,%PREFIX%,@prefix@,;s,%LIBDIR%,@libdir@," rubberband.pc.in \
+-      sed "s,%PREFIX%,$(PREFIX)," rubberband.pc.in \
++      sed "s,%PREFIX%,$(PREFIX),;s,%LIBDIR%,$(INSTALL_LIBDIR)," 
rubberband.pc.in \
          > $(DESTDIR)$(INSTALL_PKGDIR)/rubberband.pc
  
  clean:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rubberband.git/commitdiff/2508a369bc33f6f95c45d048d1505f1a7c682995

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to