From 83d325cc43243b45d4ae9b00e0cd46f9735eba91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 7 Mar 2017 09:41:02 +0100 Subject: [PATCH] - updated to 0.7.4 - dropped out-dated language bindings - split utils into own package --- .gitignore | 1 + libdmtx-0.7.2-php54.patch | 12 --- libdmtx-0.7.2-ruby19.patch | 23 ------ libdmtx.spec | 148 +++++-------------------------------- sources | 2 +- 5 files changed, 19 insertions(+), 167 deletions(-) delete mode 100644 libdmtx-0.7.2-php54.patch delete mode 100644 libdmtx-0.7.2-ruby19.patch diff --git a/.gitignore b/.gitignore index b2d262e..87b96a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libdmtx-0.7.2.tar.bz2 +/libdmtx-0.7.4.tar.bz2 diff --git a/libdmtx-0.7.2-php54.patch b/libdmtx-0.7.2-php54.patch deleted file mode 100644 index b360697..0000000 --- a/libdmtx-0.7.2-php54.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up libdmtx-0.7.2/wrapper/php/dmtx_write.c.php54 libdmtx-0.7.2/wrapper/php/dmtx_write.c ---- libdmtx-0.7.2/wrapper/php/dmtx_write.c.php54 2012-02-08 10:39:04.000000000 +0100 -+++ libdmtx-0.7.2/wrapper/php/dmtx_write.c 2012-02-08 10:39:11.000000000 +0100 -@@ -34,7 +34,7 @@ int le_dmtx_image; - - ZEND_DECLARE_MODULE_GLOBALS(dmtx) - --static function_entry dmtx_functions[] = { -+static zend_function_entry dmtx_functions[] = { - PHP_FE(dmtx_write, NULL) - PHP_FE(dmtx_getRow, NULL) - PHP_FE(dmtx_getSize, NULL) diff --git a/libdmtx-0.7.2-ruby19.patch b/libdmtx-0.7.2-ruby19.patch deleted file mode 100644 index f42d2af..0000000 --- a/libdmtx-0.7.2-ruby19.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up libdmtx-0.7.2/wrapper/ruby/Rdmtx.c.ruby19 libdmtx-0.7.2/wrapper/ruby/Rdmtx.c ---- libdmtx-0.7.2/wrapper/ruby/Rdmtx.c.ruby19 2012-02-08 10:49:04.000000000 +0100 -+++ libdmtx-0.7.2/wrapper/ruby/Rdmtx.c 2012-02-08 10:49:36.000000000 +0100 -@@ -35,7 +35,7 @@ static VALUE rdmtx_decode(VALUE self, VA - - VALUE safeImageString = StringValue(rawImageString); - -- char * imageBuffer = RSTRING(safeImageString)->ptr; -+ char * imageBuffer = RSTRING_PTR(safeImageString); - - int width = NUM2INT(rb_funcall(image, rb_intern("columns"), 0)); - int height = NUM2INT(rb_funcall(image, rb_intern("rows"), 0)); -@@ -90,8 +90,8 @@ static VALUE rdmtx_encode(VALUE self, VA - dmtxEncodeSetProp(enc, DmtxPropSizeRequest, DmtxSymbolSquareAuto); - - /* Create barcode image */ -- if (dmtxEncodeDataMatrix(enc, RSTRING(safeString)->len, -- (unsigned char *)RSTRING(safeString)->ptr) == DmtxFail) { -+ if (dmtxEncodeDataMatrix(enc, RSTRING_LEN(safeString), -+ (unsigned char *)RSTRING_PTR(safeString)) == DmtxFail) { - // printf("Fatal error !\n"); - dmtxEncodeDestroy(&enc); - return Qnil; diff --git a/libdmtx.spec b/libdmtx.spec index 3657e52..7c5453f 100644 --- a/libdmtx.spec +++ b/libdmtx.spec @@ -1,29 +1,17 @@ -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - - Name: libdmtx -Version: 0.7.2 -Release: 21%{?dist} +Version: 0.7.4 +Release: 1%{?dist} Summary: Library for working with Data Matrix 2D bar-codes Group: System Environment/Libraries -License: LGPLv2+ +License: BSD URL: http://www.libdmtx.org/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 -Patch0: %{name}-0.7.2-php54.patch -Patch1: %{name}-0.7.2-ruby19.patch - -BuildRequires: ImageMagick-devel -# required for tests -BuildRequires: SDL_image-devel -BuildRequires: libGLU-devel -BuildRequires: libpng-devel -# language bindings -BuildRequires: php-devel -BuildRequires: python-devel -BuildRequires: ruby -BuildRequires: ruby-devel -#BuildRequires: java-1.6.0-devel + +# obsolete language bindings we can't provide any more +Obsoletes: php-libdmtx < 0.7.4 +Obsoletes: python-libdmtx < 0.7.4 +Obsoletes: ruby-libdmtx < 0.7.4 %description @@ -49,116 +37,24 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%package utils -Summary: Utilities for %{name} -Group: Applications/System -Requires: %{name} = %{version}-%{release} - -%description utils -The %{name}-utils package contains utilities that use %{name}. - -# language bindings -%package -n php-libdmtx -Summary: PHP bindings for %{name} -Group: System Environment/Libraries -License: GPLv2+ -Requires: %{name} = %{version}-%{release} -Requires: php-common - -%description -n php-libdmtx -The php-%{name} package contains bindings for using %{name} from PHP. - -%package -n python-libdmtx -Summary: Python bindings for %{name} -Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} - -%description -n python-libdmtx -The python-%{name} package contains bindings for using %{name} from Python. - -%package -n ruby-libdmtx -Summary: Ruby bindings for %{name} -Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} -Provides: ruby(%{name}) = %{version} - -%description -n ruby-libdmtx -The ruby-%{name} package contains bindings for using %{name} from Ruby. - - %prep -%setup -q -%patch0 -p1 -b .php54 -%patch1 -p1 -b .ruby19 - -# fix permissions -chmod a-x wrapper/{php,python}/README +%autosetup %build %configure --disable-static make %{?_smp_mflags} -# temporary installation required by the language wrappers -make install DESTDIR=/tmp - -# language wrappers must be built separately -pushd wrapper -pushd php -phpize -%configure --disable-static - -# Don't use rpath! -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -make EXTRA_CFLAGS="-I/tmp%{_includedir}" DMTX_SHARED_LIBADD="-L/tmp%{_libdir} -ldmtx" -popd - -pushd python -# fix paths -sed -i.orig -e "s|/usr/local/include|/tmp%{_includedir}|" -e "s|/usr/local/lib|/tmp%{_libdir}|" setup.py -python setup.py build -chmod 0755 build/lib.*/*.so -popd - -pushd ruby -ruby extconf.rb --vendor -make CPPFLAGS="-I/tmp%{_includedir}" LIBPATH="-L/tmp%{_libdir} -ldmtx" -popd - -#pushd java -#make LIBDMTX_LA="/tmp%{_libdir}/libdmtx.so" -#popd -popd - %install make install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -pushd wrapper -pushd php -make install INSTALL_ROOT=$RPM_BUILD_ROOT -popd - -pushd python -python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT -popd - -pushd ruby -make install DESTDIR=$RPM_BUILD_ROOT -popd - -#pushd java -#popd -popd - %check make check pushd test -for t in simple unit +for t in simple do ./${t}_test/${t}_test done @@ -171,7 +67,8 @@ popd %files -%doc AUTHORS COPYING.LESSER ChangeLog KNOWNBUG NEWS README README.linux TODO +%license LICENSE +%doc AUTHORS ChangeLog KNOWNBUG README README.linux TODO %{_libdir}/%{name}.so.* %files devel @@ -181,24 +78,13 @@ popd %{_libdir}/pkgconfig/%{name}.pc %{_mandir}/man3/%{name}.3* -%files utils -%{_bindir}/dmtx* -%{_mandir}/man1/dmtx*.1* - -%files -n php-libdmtx -%doc COPYING wrapper/php/README -%{_libdir}/php/modules/*.so - -%files -n python-libdmtx -%doc wrapper/python/README -%{python_sitearch}/* - -%files -n ruby-libdmtx -%doc wrapper/ruby/README -%{ruby_vendorarchdir}/*.so - %changelog +* Fri Mar 03 2017 Dan HorĂ¡k - 0.7.4-1 +- updated to 0.7.4 +- dropped out-dated language bindings +- split utils into own package + * Fri Feb 10 2017 Fedora Release Engineering - 0.7.2-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 0815286..117124a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0684cf3857591e777b57248d652444ae libdmtx-0.7.2.tar.bz2 +SHA512 (libdmtx-0.7.4.tar.bz2) = 13066ecefb3da3746c6f1e872ae7493bb3902fb891ef6d96f65a90ca444107662fcad4a7fae3463ab2f6503f0962d248a5dcd754a6eb0b5c624ae68100b9c056