aboutsummaryrefslogtreecommitdiffstats
path: root/databases/dbf
diff options
context:
space:
mode:
authorsylvio <sylvio@FreeBSD.org>2012-06-06 04:45:37 +0800
committersylvio <sylvio@FreeBSD.org>2012-06-06 04:45:37 +0800
commit3c1e883dc21647ef8ea1e5688acc30b94cbdc926 (patch)
treef045ba9198ef7adc3faf4e4780349e69c8d79959 /databases/dbf
parent05503ac24b49dc836bac64ce212b35050df0e142 (diff)
downloadfreebsd-ports-gnome-3c1e883dc21647ef8ea1e5688acc30b94cbdc926.tar.gz
freebsd-ports-gnome-3c1e883dc21647ef8ea1e5688acc30b94cbdc926.tar.zst
freebsd-ports-gnome-3c1e883dc21647ef8ea1e5688acc30b94cbdc926.zip
- Update to version 0.9.0
New file: pkg-plist Remove file: files/patch-dbf.c files/patch-statistic PR: ports/168594 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'databases/dbf')
-rw-r--r--databases/dbf/Makefile68
-rw-r--r--databases/dbf/distinfo6
-rw-r--r--databases/dbf/files/patch-dbf.c53
-rw-r--r--databases/dbf/files/patch-statistic82
-rw-r--r--databases/dbf/pkg-plist10
5 files changed, 69 insertions, 150 deletions
diff --git a/databases/dbf/Makefile b/databases/dbf/Makefile
index 7b01c1837573..964177025685 100644
--- a/databases/dbf/Makefile
+++ b/databases/dbf/Makefile
@@ -7,28 +7,70 @@
#
PORTNAME= dbf
-PORTVERSION= 0.8.3.1
+PORTVERSION= 0.9.0
CATEGORIES= databases
-MASTER_SITES= BERLIOS
-DISTNAME= ${PORTNAME}-${PORTVERSION}.src
+MASTER_SITES= SF/${PORTNAME}.berlios
+DISTFILES= ${PORTNAME}-core-${PORTVERSION}.src.zip \
+ lib${PORTNAME}-0.0.1.src.zip
MAINTAINER= ports@FreeBSD.org
COMMENT= Show and convert the content of dBASE III, IV, and 5.0 files
-DEPRECATED= berlios masters no longer have any code on them. Upstream unavailable for years
-EXPIRATION_DATE=2012-8-28
+OPTIONS_DEFINE= NLS
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
+WRKSRC= ${WRKDIR}/lib${PORTNAME}
-PLIST_FILES= bin/dbf
-MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}"
+USE_ZIP= yes
+USE_GNOME= gnomehack intltool
+USE_GCC= 4.6+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= ac_cv_prog_DOC_TO_MAN=""
+USE_LDCONFIG= yes
+MAKE_JOBS_SAFE= yes
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNLS}
+USE_GETTEXT= yes
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lintl
+PLIST_SUB+= NLS=""
+.else
+CONFIGURE_ENV+= ac_cv_header_libintl_h=no
+PLIST_SUB+= NLS="@comment "
+.endif
+
+.if !defined(DISABLE_MAKE_JOBS)
+_make_jobs= -j${MAKE_JOBS_NUMBER}
+.endif
+
+post-extract:
+ @${FIND} ${WRKDIR} -name "configure" -or -name "install-sh" | \
+ ${XARGS} ${CHMOD} ${BINMODE}
post-patch:
-.for file in endian.h tables.h
- @${REINPLACE_CMD} -e '/typedef u_int/d' ${WRKSRC}/${file}
-.endfor
+ @${REINPLACE_CMD} -e \
+ '/typedef u_int/d' ${WRKSRC}/src/endian.h
+
+post-configure:
+ @(cd ${WRKDIR}/${PORTNAME}-core && ${SETENV} ${CONFIGURE_ENV} \
+ CC="${CC}" CXX="${CXX}" \
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ CPPFLAGS="-I${WRKSRC}/include" \
+ LDFLAGS="-L${WRKSRC}/src/.libs" \
+ INSTALL_DATA="${INSTALL_DATA}" \
+ INSTALL_LIB="${INSTALL_LIB}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+ ac_cv_lib_dbf_dbf_Open=yes \
+ ./configure --prefix=${PREFIX})
+
+post-build:
+ @(cd ${WRKDIR}/${PORTNAME}-core && ${SETENV} ${MAKE_ENV} ${MAKE} \
+ ${MAKE_FLAGS} ${MAKEFILE} ${_make_jobs} ${ALL_TARGET})
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/dbf ${PREFIX}/bin
+post-install:
+ @(cd ${WRKDIR}/${PORTNAME}-core && ${SETENV} ${MAKE_ENV} ${MAKE} \
+ ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
.include <bsd.port.mk>
diff --git a/databases/dbf/distinfo b/databases/dbf/distinfo
index 20e6b7d516b4..ecfbc7e6d691 100644
--- a/databases/dbf/distinfo
+++ b/databases/dbf/distinfo
@@ -1,2 +1,4 @@
-SHA256 (dbf-0.8.3.1.src.tar.gz) = 36cc8960823623fc5b09b7d5ff8ac93bac9b61b075bc33eaf70607e9a6234540
-SIZE (dbf-0.8.3.1.src.tar.gz) = 26054
+SHA256 (dbf-core-0.9.0.src.zip) = 6e40a164a457e6972d996d1600f5a83aa748e8c152f78dc0057247da19fb912a
+SIZE (dbf-core-0.9.0.src.zip) = 781109
+SHA256 (libdbf-0.0.1.src.zip) = 36e0dba4cef0af7b1e33637ea71fe1f03120b34e80e1b663c92fb35340197864
+SIZE (libdbf-0.0.1.src.zip) = 843956
diff --git a/databases/dbf/files/patch-dbf.c b/databases/dbf/files/patch-dbf.c
deleted file mode 100644
index c79a8ed3f854..000000000000
--- a/databases/dbf/files/patch-dbf.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- dbf.c Fri Apr 16 08:17:22 2004
-+++ dbf.c Fri Apr 16 15:31:29 2004
-@@ -245,11 +245,11 @@
- int dbfhandle;
- FILE *output = NULL;
- int header_length, record_length, i;
-- const char *filename = NULL, *export_filename = NULL;
-+ const char *filename, *export_filename = NULL;
- headerMethod writeHeader = NULL;
- lineMethod writeLine = printDBF;
- unsigned char *record;
-- char *flag_byte;
-+ char flag_byte;
-
- if (argc < 2) {
- fprintf(stderr, "Usage: %s [option][argument] dbf-file, -h for help\n", *argv);
-@@ -342,7 +342,4 @@
- if (verbosity > 0)
- banner();
-
-- if(export_filename && 0 == strcmp(export_filename, "-"))
-- output = stdout;
-- else
-- output = export_open(export_filename);
-+ output = export_open(export_filename);
-@@ -372,12 +372,7 @@
- /* At this point we look if the following data set is deleted */
- lseek(dbfhandle, rotate2b(db->header_length), SEEK_SET);
-
-- if ( (flag_byte = malloc(1)) == NULL ) {
-- perror("malloc");
-- exit(1);
-- }
--
-- if ( -1 == read(dbfhandle, flag_byte, 1) ) {
-+ if ( -1 == read(dbfhandle, &flag_byte, 1) ) {
- perror("reading Flag Byte");
- exit(1);
- }
-@@ -389,11 +384,11 @@
- exit(1);
- }
-
-- if (*flag_byte == '*' && keep_deleted == 0) {
-+ if (flag_byte == '*' && keep_deleted == 0) {
- fputc('#', output);
- }
-
-- *flag_byte = *(record + record_length - 1);
-+ flag_byte = *(record + record_length - 1);
-
- /* automaticly convert options */
- if (convert)
diff --git a/databases/dbf/files/patch-statistic b/databases/dbf/files/patch-statistic
deleted file mode 100644
index 81ab78605626..000000000000
--- a/databases/dbf/files/patch-statistic
+++ /dev/null
@@ -1,82 +0,0 @@
---- statistic.h Fri Apr 16 07:36:47 2004
-+++ statistic.h Fri Apr 16 15:42:21 2004
-@@ -15,5 +15,4 @@
- #include "endian.h"
-
--char *get_db_version (int version);
- void dbf_file_info (const struct DB_HEADER *db);
- void dbf_field_stat (const struct DB_FIELD *header, int header_length);
---- statistic.c Fri Apr 16 07:36:47 2004
-+++ statistic.c Fri Apr 16 15:40:47 2004
-@@ -15,43 +15,37 @@
- #include "dbf.h"
-
-
--char *get_db_version (int version) {
-- char *name;
-+static const char *
-+get_db_version (int version) {
-+ static char name[31];
-
- switch (version) {
-- case 0x02:
-- // without memo fields
-- name = "FoxBase";
-- break;
-- case 0x03:
-- // without memo fields
-- name = "FoxBase+/dBASE III+";
-- break;
-- case 0x04:
-- // without memo fields
-- name = "dBASE IV";
-- break;
-- case 0x05:
-- // without memo fields
-- name = "dBASE 5.0";
-- break;
-- case 0x83:
-- name = "FoxBase+/dBASE III+";
-- break;
-- case 0x8B:
-- name = "dBASE IV";
-- break;
-- case 0x30:
-- // without memo fields
-- name = "Visual FoxPro";
-- break;
-- case 0xF5:
-- // with memo fields
-- name = "FoxPro 2.0";
-- break;
-+ case 0x02:
-+ // without memo fields
-+ return "FoxBase";
-+ case 0x03:
-+ // without memo fields
-+ return "FoxBase+/dBASE III+";
-+ case 0x04:
-+ // without memo fields
-+ return "dBASE IV";
-+ case 0x05:
-+ // without memo fields
-+ return "dBASE 5.0";
-+ case 0x83:
-+ return "FoxBase+/dBASE III+";
-+ case 0x8B:
-+ return "dBASE IV";
-+ case 0x30:
-+ // without memo fields
-+ return "Visual FoxPro";
-+ case 0xF5:
-+ // with memo fields
-+ return "FoxPro 2.0";
-+ default:
-+ sprintf(name, "Unknown (code 0x%.2X)", version);
-+ return name;
- }
--
-- return name;
- }
-
-
diff --git a/databases/dbf/pkg-plist b/databases/dbf/pkg-plist
new file mode 100644
index 000000000000..abe511859d09
--- /dev/null
+++ b/databases/dbf/pkg-plist
@@ -0,0 +1,10 @@
+bin/dbf
+include/libdbf/libdbf.h
+lib/libdbf.a
+lib/libdbf.la
+lib/libdbf.so
+lib/libdbf.so.0
+libdata/pkgconfig/libdbf.pc
+%%NLS%%share/locale/de/LC_MESSAGES/dbf.mo
+%%NLS%%share/locale/de/LC_MESSAGES/libdbf.mo
+@dirrm include/libdbf