diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8743310..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -libpuzzle-0.11.tar.bz2 diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/libpuzzle-0.11-php7.patch b/libpuzzle-0.11-php7.patch deleted file mode 100644 index e2155b0..0000000 --- a/libpuzzle-0.11-php7.patch +++ /dev/null @@ -1,155 +0,0 @@ -From f84c910a305a8dbae3a4d8548764b0603819e05f Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 16 Nov 2016 07:41:19 +0100 -Subject: [PATCH 2/2] fix PHP 5/7 compatibility - ---- - php/libpuzzle/libpuzzle.c | 40 +++++++++++++++++++++++++--------------- - 1 file changed, 25 insertions(+), 15 deletions(-) - -diff --git a/php/libpuzzle/libpuzzle.c b/php/libpuzzle/libpuzzle.c -index 82e84c3..f69ee4a 100644 ---- a/php/libpuzzle/libpuzzle.c -+++ b/php/libpuzzle/libpuzzle.c -@@ -8,6 +8,16 @@ - #include - #include "php_libpuzzle.h" - -+/* Compatibility layer */ -+#if PHP_MAJOR_VERSION < 7 -+#define RV_STRINGL(s,l) RETVAL_STRINGL(s, l, 1); -+typedef int strsize_t; -+typedef long zend_long; -+#else -+#define RV_STRINGL(s,l) RETVAL_STRINGL(s, l); -+typedef size_t strsize_t; -+#endif -+ - ZEND_DECLARE_MODULE_GLOBALS(libpuzzle) - - /* True global resources - no need for thread safety here */ -@@ -122,7 +132,7 @@ PHP_MINFO_FUNCTION(libpuzzle) - PHP_FUNCTION(puzzle_fill_cvec_from_file) - { - char *arg = NULL; -- int arg_len; -+ strsize_t arg_len; - PuzzleContext *context; - PuzzleCvec cvec; - -@@ -137,7 +147,7 @@ PHP_FUNCTION(puzzle_fill_cvec_from_file) - puzzle_free_cvec(context, &cvec); - RETURN_FALSE; - } -- RETVAL_STRINGL(cvec.vec, cvec.sizeof_vec, 1); -+ RV_STRINGL((char *)cvec.vec, cvec.sizeof_vec); - puzzle_free_cvec(context, &cvec); - } - /* }}} */ -@@ -147,7 +157,7 @@ PHP_FUNCTION(puzzle_fill_cvec_from_file) - PHP_FUNCTION(puzzle_compress_cvec) - { - char *arg = NULL; -- int arg_len; -+ strsize_t arg_len; - PuzzleContext *context; - PuzzleCompressedCvec compressed_cvec; - PuzzleCvec cvec; -@@ -160,7 +170,7 @@ PHP_FUNCTION(puzzle_compress_cvec) - } - puzzle_init_compressed_cvec(context, &compressed_cvec); - puzzle_init_cvec(context, &cvec); -- cvec.vec = arg; -+ cvec.vec = (signed char *)arg; - cvec.sizeof_vec = (size_t) arg_len; - if (puzzle_compress_cvec(context, &compressed_cvec, &cvec) != 0) { - puzzle_free_compressed_cvec(context, &compressed_cvec); -@@ -168,8 +178,8 @@ PHP_FUNCTION(puzzle_compress_cvec) - puzzle_free_cvec(context, &cvec); - RETURN_FALSE; - } -- RETVAL_STRINGL(compressed_cvec.vec, -- compressed_cvec.sizeof_compressed_vec, 1); -+ RV_STRINGL((char *)compressed_cvec.vec, -+ compressed_cvec.sizeof_compressed_vec); - puzzle_free_compressed_cvec(context, &compressed_cvec); - cvec.vec = NULL; - puzzle_free_cvec(context, &cvec); -@@ -181,7 +191,7 @@ PHP_FUNCTION(puzzle_compress_cvec) - PHP_FUNCTION(puzzle_uncompress_cvec) - { - char *arg = NULL; -- int arg_len; -+ strsize_t arg_len; - PuzzleContext *context; - PuzzleCompressedCvec compressed_cvec; - PuzzleCvec cvec; -@@ -194,7 +204,7 @@ PHP_FUNCTION(puzzle_uncompress_cvec) - } - puzzle_init_compressed_cvec(context, &compressed_cvec); - puzzle_init_cvec(context, &cvec); -- compressed_cvec.vec = arg; -+ compressed_cvec.vec = (unsigned char *)arg; - compressed_cvec.sizeof_compressed_vec = (size_t) arg_len; - if (puzzle_uncompress_cvec(context, &compressed_cvec, &cvec) != 0) { - puzzle_free_cvec(context, &cvec); -@@ -202,7 +212,7 @@ PHP_FUNCTION(puzzle_uncompress_cvec) - puzzle_free_compressed_cvec(context, &compressed_cvec); - RETURN_FALSE; - } -- RETVAL_STRINGL(cvec.vec, cvec.sizeof_vec, 1); -+ RV_STRINGL((char *)cvec.vec, cvec.sizeof_vec); - puzzle_free_cvec(context, &cvec); - compressed_cvec.vec = NULL; - puzzle_free_compressed_cvec(context, &compressed_cvec); -@@ -214,7 +224,7 @@ PHP_FUNCTION(puzzle_uncompress_cvec) - PHP_FUNCTION(puzzle_vector_normalized_distance) - { - char *vec1 = NULL, *vec2 = NULL; -- int vec1_len, vec2_len; -+ strsize_t vec1_len, vec2_len; - PuzzleContext *context; - PuzzleCvec cvec1, cvec2; - double d; -@@ -232,9 +242,9 @@ PHP_FUNCTION(puzzle_vector_normalized_distance) - } - puzzle_init_cvec(context, &cvec1); - puzzle_init_cvec(context, &cvec2); -- cvec1.vec = vec1; -+ cvec1.vec = (signed char *)vec1; - cvec1.sizeof_vec = (size_t) vec1_len; -- cvec2.vec = vec2; -+ cvec2.vec = (signed char *)vec2; - cvec2.sizeof_vec = (size_t) vec2_len; - d = puzzle_vector_normalized_distance(context, &cvec1, &cvec2, - (int) fix_for_texts); -@@ -250,7 +260,7 @@ PHP_FUNCTION(puzzle_vector_normalized_distance) - PHP_FUNCTION(puzzle_set_max_width) - { - PuzzleContext *context; -- long width; -+ zend_long width; - - context = &LIBPUZZLE_G(global_context); - if (zend_parse_parameters -@@ -270,7 +280,7 @@ PHP_FUNCTION(puzzle_set_max_width) - PHP_FUNCTION(puzzle_set_max_height) - { - PuzzleContext *context; -- long height; -+ zend_long height; - - context = &LIBPUZZLE_G(global_context); - if (zend_parse_parameters -@@ -290,7 +300,7 @@ PHP_FUNCTION(puzzle_set_max_height) - PHP_FUNCTION(puzzle_set_lambdas) - { - PuzzleContext *context; -- long lambdas; -+ zend_long lambdas; - - context = &LIBPUZZLE_G(global_context); - if (zend_parse_parameters --- -2.9.3 - diff --git a/libpuzzle-0.11-pkgconfig.patch b/libpuzzle-0.11-pkgconfig.patch deleted file mode 100644 index 55121d9..0000000 --- a/libpuzzle-0.11-pkgconfig.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4d2da65b1416e07bd2529ab03d2c32a87041945d Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 16 Nov 2016 07:27:59 +0100 -Subject: [PATCH 1/2] Use pkg-config instead of deprecated gdlib-config - ---- - php/libpuzzle/config.m4 | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - -diff --git a/php/libpuzzle/config.m4 b/php/libpuzzle/config.m4 -index 84f954a..2d8bbc0 100644 ---- a/php/libpuzzle/config.m4 -+++ b/php/libpuzzle/config.m4 -@@ -6,15 +6,24 @@ PHP_ARG_WITH(libpuzzle, for libpuzzle support, - [ --with-libpuzzle Include libpuzzle support]) - - if test "$PHP_LIBPUZZLE" != "no"; then -- for i in $PHP_LIBPUZZLE /usr/local /usr; do -- if test -x "$i/bin/gdlib-config"; then -- GDLIB_CONFIG=$i/bin/gdlib-config -- break -- fi -- done -- GDLIB_LIBS=$($GDLIB_CONFIG --ldflags --libs) -- GDLIB_INCS=$($GDLIB_CONFIG --cflags) -- -+ -+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -+ AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no) -+ -+ AC_MSG_CHECKING(for libgd) -+ if test -x "$PKG_CONFIG" && $PKG_CONFIG gdlib --exists; then -+ GDLIB_LIBS=$($PKG_CONFIG gdlib --libs) -+ GDLIB_INCS=$($PKG_CONFIG gdlib --cflags) -+ GDLIB_VERS=$($PKG_CONFIG gdlib --modversion) -+ AC_MSG_RESULT(from pkg_config: found $GDLIB_VERS) -+ elif test -x "$GDLIB_CONFIG"; then -+ GDLIB_LIBS=$($GDLIB_CONFIG --ldflags --libs) -+ GDLIB_INCS=$($GDLIB_CONFIG --cflags) -+ GDLIB_VERS=$($GDLIB_CONFIG --version) -+ AC_MSG_RESULT(from gdlib_config: found $GDLIB_VERS) -+ else -+ AC_MSG_ERROR(not found) -+ fi - PHP_EVAL_LIBLINE($GDLIB_LIBS, LIBPUZZLE_SHARED_LIBADD) - PHP_EVAL_INCLINE($GDLIB_INCS) - --- -2.9.3 - diff --git a/libpuzzle.spec b/libpuzzle.spec deleted file mode 100644 index 532dae6..0000000 --- a/libpuzzle.spec +++ /dev/null @@ -1,251 +0,0 @@ -%if "%{php_version}" < "5.6" -%global ini_name %{name}.ini -%else -%global ini_name 40-%{name}.ini -%endif - -Name: libpuzzle -Version: 0.11 -Release: 38%{?dist} -Summary: Library to quickly find visually similar images (gif, png, jpg) -Group: System Environment/Libraries -License: BSD -URL: http://libpuzzle.pureftpd.org/project/libpuzzle -Source0: http://download.pureftpd.org/pub/pure-ftpd/misc/libpuzzle/releases/%{name}-%{version}.tar.bz2 -BuildRequires: gd-devel -# Compatibility with PHP 5 and 7 and use pkg-config -Patch0: libpuzzle-0.11-php7.patch -# Use pkg-config instead of gdlib-config when available -Patch1: libpuzzle-0.11-pkgconfig.patch - -%description -The Puzzle library is designed to quickly find visually similar images -(gif, png, jpg), even if they have been resized, recompressed, -recolored or slightly modified. The library is free, lightweight yet -very fast, configurable, easy to use and it has been designed with -security in mind. - -%package -n php-%{name} -Summary: PHP extension for %{name} -Group: Development/Libraries -BuildRequires: php-devel -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} - -# Fix private-shared-object-provides -# RPM 4.8 -%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$} -%{?filter_setup} -# RPM 4.9 -%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$ - -%description -n php-%{name} -The %{name} native PHP extension for developing PHP applications that -use %{name}. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. - - -%prep -%setup -q -%patch0 -p1 -b .php7 -%patch1 -p1 -b .pkgconfig - -%build -%{__cat} <<'EOF' >%{ini_name} -extension=libpuzzle.so -EOF - -%configure --disable-static -%{__sed} -i.rpath -e 's|^\(hardcode_libdir_flag_spec=\).*|\1""|' libtool -%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -%{__make} %{?_smp_mflags} -%{__make} DESTDIR=%{_builddir}/%{name}-%{version} install INSTALL="install -p" - -%{__cp} -ra php php-plain -iconv -f iso8859-1 -t utf-8 php-plain/examples/similar/similar.php > similar.php && mv -f similar.php php-plain/examples/similar/similar.php -cd php/libpuzzle -phpize - -%if 0%{?__isa_bits} == 64 -LDFLAGS="$LDFLAGS -L%{_builddir}/%{name}-%{version}/usr/lib64"; export LDFLAGS -%endif - -%{__sed} -i.rpath -e 's|\$ld_runpath_switch\$ai_p||g' configure -%configure --with-libpuzzle=%{_builddir}/%{name}-%{version}/usr -%{__sed} -i.rpath -e 's|^\(hardcode_libdir_flag_spec=\).*|\1""|' libtool -%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -%{__make} %{?_smp_mflags} - -cd - -%{__cp} php/libpuzzle/modules/%{name}.so php_%name.so -%{__rm} -rf php -%{__mv} php-plain php - -%install -%{__rm} -rf %{buildroot} -%{__install} -p -D -m0755 php_%{name}.so %{buildroot}/%{php_extdir}/%{name}.so -%{__make} install DESTDIR=%{buildroot} INSTALL="install -p" -find %{buildroot} -name '*.la' -exec rm -f {} ';' -%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d -%{__install} -p -m0644 %{ini_name} %{buildroot}%{_sysconfdir}/php.d/%{ini_name} - -%check -# Minimal load test of php extension -LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ -php --no-php-ini \ - --define extension_dir=${RPM_BUILD_ROOT}%{php_extdir} \ - --define extension=%{name}.so \ - --modules | grep %{name} - - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%doc AUTHORS COPYING README THANKS -%{_libdir}/*.so.* -%{_mandir}/man8/* -%{_bindir}/* - -%files -n php-%{name} -%doc README-PHP php/libpuzzle/{README,CREDITS,LICENSE} php/examples/similar/*.{sql,php} -%config(noreplace) %{_sysconfdir}/php.d/%{ini_name} -%{php_extdir}/%{name}.so - -%files devel -%{_libdir}/*.so -%{_includedir}/* -%{_mandir}/man3/* - -%changelog -* Fri Oct 12 2018 Remi Collet - 0.11-38 -- Rebuild for https://fedoraproject.org/wiki/Changes/php73 - -* Fri Jul 13 2018 Fedora Release Engineering - 0.11-37 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 0.11-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Oct 03 2017 Remi Collet - 0.11-35 -- rebuild for https://fedoraproject.org/wiki/Changes/php72 - -* Thu Aug 03 2017 Fedora Release Engineering - 0.11-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.11-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Jul 07 2017 Igor Gnatenko - 0.11-32 -- Rebuild due to bug in RPM (RHBZ #1468476) - -* Fri Feb 10 2017 Fedora Release Engineering - 0.11-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Nov 16 2016 Remi Collet - 0.11-30 -- add patch to use pkg-config instead of gdlib-config -- improve patch for PHP 7+ -- arched inter package dependency - -* Tue Nov 15 2016 Remi Collet - 0.11-29 -- rebuild for https://fedoraproject.org/wiki/Changes/php71 - -* Fri Jul 22 2016 Tom Callaway - 0.11-28 -- rebuild to drop libvpx dep -- fix build against rawhide php - -* Thu Feb 04 2016 Fedora Release Engineering - 0.11-27 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Dec 1 2015 Tom Callaway - 0.11-26 -- rebuild for libvpx 1.5.0 - -* Wed Jun 17 2015 Fedora Release Engineering - 0.11-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Apr 6 2015 Tom Callaway - 0.11-24 -- rebuild for libvpx 1.4.0 - -* Sun Aug 17 2014 Fedora Release Engineering - 0.11-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Tue Jul 01 2014 Yaakov Selkowitz - 0.11-22 -- Fix FTBFS on aarch64 (#925867) - -* Fri Jun 20 2014 Remi Collet - 0.11-21 -- rebuild for https://fedoraproject.org/wiki/Changes/Php56 -- add numerical prefix to extension configuration file - -* Sat Jun 07 2014 Fedora Release Engineering - 0.11-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sat Aug 03 2013 Fedora Release Engineering - 0.11-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jun 11 2013 Remi Collet - 0.11-18 -- rebuild for new GD 2.1.0 - -* Fri Mar 22 2013 Remi Collet - 0.11-17 -- rebuild for http://fedoraproject.org/wiki/Features/Php55 - -* Thu Feb 14 2013 Fedora Release Engineering - 0.11-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 0.11-15 -- rebuild due to "jpeg8-ABI" feature drop - -* Fri Dec 21 2012 Adam Tkac - 0.11-14 -- rebuild against new libjpeg - -* Thu Jul 19 2012 Fedora Release Engineering - 0.11-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Jan 19 2012 Remi Collet - 0.11-12 -- build against php 5.4.0 -- add %%check for php extension -- add filter to fix private-shared-object-provides - -* Fri Jan 13 2012 Fedora Release Engineering - 0.11-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Dec 06 2011 Adam Jackson - 0.11-10 -- Rebuild for new libpng - -* Fri Jul 15 2011 Andrew Colin Kissa - 0.11-9 -- Fix bugzilla #716003 - -* Tue Feb 08 2011 Fedora Release Engineering - 0.11-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Aug 07 2009 Dennis Gilmore - 0.11-7 -- add sparc64 and s390x to the list of arches that use lib64 - -* Sat Jul 25 2009 Fedora Release Engineering - 0.11-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Mon Jul 13 2009 Remi Collet - 0.11-5 -- rebuild for new PHP 5.3.0 ABI (20090626) -- add PHP ABI check - -* Sun Jun 21 2009 Andrew Colin Kissa - 0.11-4 -- Consistent use of macros - -* Sun Jun 21 2009 Andrew Colin Kissa - 0.11-3 -- Fixes to issues raised by reviewer - -* Thu Jun 18 2009 Andrew Colin Kissa - 0.11-2 -- Fix rpmlint issues - -* Sun May 14 2009 Andrew Colin Kissa - 0.11-1 -- Initial release - diff --git a/sources b/sources deleted file mode 100644 index 00b324e..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -f9edc7322c6f422be395244eefbda180 libpuzzle-0.11.tar.bz2