mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Fix a few of its glaring bugs around type widths.
Find newer BerkeleyDB versions. Link with PNG again.
This commit is contained in:
parent
b8b2ca14f4
commit
3d2f6f3e81
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=365004
@ -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
|
||||
|
@ -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
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
||||
|
25
print/panda/files/patch-utility.c
Normal file
25
print/panda/files/patch-utility.c
Normal file
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user