- updated to 0.7.4

- dropped out-dated language bindings
- split utils into own package
epel9
Dan Horák 8 years ago
parent 6cde693354
commit 83d325cc43

1
.gitignore vendored

@ -1 +1,2 @@
/libdmtx-0.7.2.tar.bz2
/libdmtx-0.7.4.tar.bz2

@ -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)

@ -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;

@ -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 <dan[at]danny.cz> - 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 <releng@fedoraproject.org> - 0.7.2-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

@ -1 +1 @@
0684cf3857591e777b57248d652444ae libdmtx-0.7.2.tar.bz2
SHA512 (libdmtx-0.7.4.tar.bz2) = 13066ecefb3da3746c6f1e872ae7493bb3902fb891ef6d96f65a90ca444107662fcad4a7fae3463ab2f6503f0962d248a5dcd754a6eb0b5c624ae68100b9c056

Loading…
Cancel
Save