1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

- 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>
This commit is contained in:
Sylvio Cesar Teixeira 2012-06-05 20:45:37 +00:00
parent 69e435baf1
commit 6635db1cc7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298525
5 changed files with 69 additions and 150 deletions

View File

@ -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
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dbf ${PREFIX}/bin
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})
post-install:
@(cd ${WRKDIR}/${PORTNAME}-core && ${SETENV} ${MAKE_ENV} ${MAKE} \
${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
.include <bsd.port.mk>

View File

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

View File

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

View File

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

10
databases/dbf/pkg-plist Normal file
View File

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