diff options
author | mandree <mandree@FreeBSD.org> | 2014-08-16 01:20:46 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2014-08-16 01:20:46 +0800 |
commit | fd85f3c4db18fcb54e2d635fab366aa188474ae8 (patch) | |
tree | a4cf81916600fd025ff9edc52a17c4165e0d3f6d /print/panda | |
parent | 5125805d6b8cc9f5d6a7dbd5ca64b2dd4b9add36 (diff) | |
download | freebsd-ports-gnome-fd85f3c4db18fcb54e2d635fab366aa188474ae8.tar.gz freebsd-ports-gnome-fd85f3c4db18fcb54e2d635fab366aa188474ae8.tar.zst freebsd-ports-gnome-fd85f3c4db18fcb54e2d635fab366aa188474ae8.zip |
Fix a few of its glaring bugs around type widths.
Find newer BerkeleyDB versions.
Link with PNG again.
Diffstat (limited to 'print/panda')
-rw-r--r-- | print/panda/Makefile | 8 | ||||
-rw-r--r-- | print/panda/files/patch-configure | 91 | ||||
-rw-r--r-- | print/panda/files/patch-database.c | 12 | ||||
-rw-r--r-- | print/panda/files/patch-images.c | 22 | ||||
-rw-r--r-- | print/panda/files/patch-objects.c | 4 | ||||
-rw-r--r-- | print/panda/files/patch-utility.c | 25 |
6 files changed, 58 insertions, 104 deletions
diff --git a/print/panda/Makefile b/print/panda/Makefile index 9a3f92870ded..875ed8f32343 100644 --- a/print/panda/Makefile +++ b/print/panda/Makefile @@ -3,7 +3,7 @@ PORTNAME= panda PORTVERSION= 0.5.4 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= print MASTER_SITES= SF \ SAVANNAH \ @@ -26,7 +26,8 @@ CONFIGURE_ARGS= --enable-berkeley-db USE_LDCONFIG= yes OPTIONS_DEFINE= DOCS EXAMPLES -CPPFLAGS+= -I${BDB_INCLUDE_DIR} -I${LOCALBASE}/include ${PTHREAD_CFLAGS} +CPPFLAGS+= -I${BDB_INCLUDE_DIR} -I${LOCALBASE}/include -DHAVE_LIBPNG ${PTHREAD_CFLAGS} +LIBS+= -lpng LDFLAGS+= -L${BDB_LIB_DIR} -L${LOCALBASE}/lib ${PTHREAD_LIBS} post-extract: @@ -35,8 +36,9 @@ post-extract: .endfor post-patch: - @${REINPLACE_CMD} -e 's| -lpanda| $$(top_srcdir)/libpanda.la|g' \ + ${REINPLACE_CMD} -e 's| -lpanda| $$(top_srcdir)/libpanda.la|g' \ ${WRKSRC}/examples/Makefile.in + ${REINPLACE_CMD} -e 's,-ldb,-l${BDB_LIB_NAME},' ${WRKSRC}/configure post-install: ${INSTALL_MAN} ${WRKSRC}/man/panda_*.3 ${STAGEDIR}${MANPREFIX}/man/man3 diff --git a/print/panda/files/patch-configure b/print/panda/files/patch-configure deleted file mode 100644 index a29720b9e253..000000000000 --- a/print/panda/files/patch-configure +++ /dev/null @@ -1,91 +0,0 @@ ---- configure.orig Tue Apr 13 09:47:26 2004 -+++ configure Fri Apr 16 01:07:19 2004 -@@ -8687,9 +8687,9 @@ - - - --echo "$as_me:$LINENO: checking for png_libpng_ver in -lpng" >&5 --echo $ECHO_N "checking for png_libpng_ver in -lpng... $ECHO_C" >&6 --if test "${ac_cv_lib_png_png_libpng_ver+set}" = set; then -+echo "$as_me:$LINENO: checking for png_get_header_ver in -lpng" >&5 -+echo $ECHO_N "checking for png_get_header_ver in -lpng... $ECHO_C" >&6 -+if test "${ac_cv_lib_png_png_get_header_ver+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -8707,11 +8707,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char png_libpng_ver (); -+char png_get_header_ver (); - int - main () - { --png_libpng_ver (); -+png_get_header_ver (); - ; - return 0; - } -@@ -8738,20 +8738,20 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_lib_png_png_libpng_ver=yes -+ ac_cv_lib_png_png_get_header_ver=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_png_png_libpng_ver=no -+ac_cv_lib_png_png_get_header_ver=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_libpng_ver" >&5 --echo "${ECHO_T}$ac_cv_lib_png_png_libpng_ver" >&6 --if test $ac_cv_lib_png_png_libpng_ver = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_header_ver" >&5 -+echo "${ECHO_T}$ac_cv_lib_png_png_get_header_ver" >&6 -+if test $ac_cv_lib_png_png_get_header_ver = yes; then - CFLAGS="$CFLAGS -DHAVE_LIBPNG" LDFLAGS="$LDFLAGS -lpng" - fi - -@@ -8983,7 +8983,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldb $LIBS" -+LIBS="-ldb41 $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -9042,7 +9042,7 @@ - echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_create" >&5 - echo "${ECHO_T}$ac_cv_lib_db_db_create" >&6 - if test $ac_cv_lib_db_db_create = yes; then -- LDFLAGS="$LDFLAGS -ldb" DATABASE="db" -+ LDFLAGS="$LDFLAGS -ldb41" DATABASE="db" - else - echo "$as_me:$LINENO: result: not found" >&5 - echo "${ECHO_T}not found" >&6 -@@ -9142,7 +9142,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldb $LIBS" -+LIBS="-ldb41 $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -9201,7 +9201,7 @@ - echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_create" >&5 - echo "${ECHO_T}$ac_cv_lib_db_db_create" >&6 - if test $ac_cv_lib_db_db_create = yes; then -- LDFLAGS="$LDFLAGS -ldb" DATABASE="db" -+ LDFLAGS="$LDFLAGS -ldb41" DATABASE="db" - cat >>confdefs.h <<\_ACEOF - #define USE_DB - _ACEOF diff --git a/print/panda/files/patch-database.c b/print/panda/files/patch-database.c index dfa5ae89f109..6c51db16365b 100644 --- a/print/panda/files/patch-database.c +++ b/print/panda/files/patch-database.c @@ -1,5 +1,5 @@ ---- database.c.orig Tue Apr 13 09:46:24 2004 -+++ database.c Fri Apr 16 01:13:10 2004 +--- ./database.c.orig 2004-04-13 02:46:24.000000000 +0200 ++++ ./database.c 2014-08-15 19:09:39.000000000 +0200 @@ -160,6 +160,12 @@ panda_windbwrite (document, key, value); #else @@ -13,17 +13,17 @@ #if defined DEBUG printf ("Storing (%s, %s) in 0x%08x\n", key, value, document->db); #endif -@@ -168,13 +174,6 @@ - panda_error (panda_true, "Cannot store null key\n"); +@@ -169,13 +175,6 @@ if (value == NULL) panda_error (panda_true, "Cannot store null value\n"); -- + -#ifdef USE_EDB - - e_db_data_set((E_DB_File *)document->db, key, value, strlen(value)+1); -#else - DBT db_key, db_data; - int ec; - +- memset(&db_key, 0, sizeof(db_key)); memset(&db_data, 0, sizeof(db_data)); + db_key.data = key; diff --git a/print/panda/files/patch-images.c b/print/panda/files/patch-images.c index d0df3fa6bbd0..9091205519c0 100644 --- a/print/panda/files/patch-images.c +++ b/print/panda/files/patch-images.c @@ -1,5 +1,14 @@ ---- images.c.orig 2004-04-13 02:46:24.000000000 +0200 -+++ images.c 2010-03-29 12:55:47.000000000 +0200 +--- ./images.c.orig 2004-04-13 02:46:24.000000000 +0200 ++++ ./images.c 2014-08-15 19:11:07.000000000 +0200 +@@ -835,7 +835,7 @@ + panda_object * imageObj, char *filename) + { + FILE *image; +- unsigned long width, height; ++ png_uint_32 width, height; + int bitdepth, colourtype, outColourType; + png_uint_32 i, rowbytes; + png_structp png; @@ -854,7 +854,7 @@ // Check that it really is a PNG file @@ -9,6 +18,15 @@ panda_error (panda_true, "PNG file was invalid"); // Start decompressing +@@ -1399,7 +1399,7 @@ + panda_imagesizePNG (int *width, int *height, char *filename) + { + FILE * image; +- unsigned long pwidth, pheight; ++ png_uint_32 pwidth, pheight; + int bitdepth, colourtype; + png_structp png; + png_infop info; @@ -1411,7 +1411,7 @@ // Check that it really is a PNG file diff --git a/print/panda/files/patch-objects.c b/print/panda/files/patch-objects.c index 6100ef2bea84..af5273fb8915 100644 --- a/print/panda/files/patch-objects.c +++ b/print/panda/files/patch-objects.c @@ -1,5 +1,5 @@ ---- objects.c.orig Tue Apr 13 09:46:24 2004 -+++ objects.c Wed Jun 27 23:25:53 2007 +--- ./objects.c.orig 2004-04-13 02:46:24.000000000 +0200 ++++ ./objects.c 2014-08-15 19:09:39.000000000 +0200 @@ -99,7 +99,7 @@ created->children = (panda_child *) panda_xmalloc (sizeof (panda_child)); diff --git a/print/panda/files/patch-utility.c b/print/panda/files/patch-utility.c new file mode 100644 index 000000000000..c37cb02f288e --- /dev/null +++ b/print/panda/files/patch-utility.c @@ -0,0 +1,25 @@ +--- ./utility.c.orig 2004-04-13 02:46:24.000000000 +0200 ++++ ./utility.c 2014-08-15 19:13:36.000000000 +0200 +@@ -509,7 +509,7 @@ + char *output; + + length = strlen (input); +- output = panda_xmalloc ((length + 1) * sizeof (char)); ++ output = panda_xmalloc ((length*2 + 1) * sizeof (char)); +
+ // todo_mikal: not sure I like the windows version of this code + for (count = 0; count < length; count++) +@@ -518,11 +518,11 @@ + sprintf (output[count], "%2x", input[count]); +
+ #else /*
*/ +- snprintf (output[count], 1, "%2x", input[count]); ++ sprintf (output+count*2, "%2x", input[count]); +
+ #endif + } + +- output[length + 1] = 0; ++ output[length*2] = 0; + return output; + } |