Lines 6-71
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= odbc |
8 |
PORTNAME= odbc |
9 |
PORTVERSION= 1.0.10 |
9 |
PORTVERSION= 2.0.2 |
10 |
PORTREVISION= 1 |
10 |
CATEGORIES= databases lang |
11 |
CATEGORIES= databases |
11 |
MASTER_SITES= ftp://ftp.freepascal.org/pub/fpc/dist/i386-freebsd-${PORTVERSION}/ \ |
12 |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
12 |
ftp://planetmirror.com/pub/fpc/dist/i386-freebsd-${PORTVERSION}/ \ |
|
|
13 |
ftp://ftp.jp.freepascal.org/mirror/fpc/dist/i386-freebsd-${PORTVERSION}/ \ |
14 |
ftp://freepascal.stack.nl/pub/fpc/dist/i386-freebsd-${PORTVERSION}/ \ |
15 |
ftp://ftp.no.freepascal.org/pub/fpc/dist/i386-freebsd-${PORTVERSION}/ \ |
16 |
ftp://ftp.us.freepascal.org/pub/fpc/dist/i386-freebsd-${PORTVERSION}/ \ |
17 |
${MASTER_SITE_SOURCEFORGE} |
13 |
MASTER_SITE_SUBDIR= freepascal |
18 |
MASTER_SITE_SUBDIR= freepascal |
14 |
PKGNAMEPREFIX= fpc- |
19 |
PKGNAMEPREFIX= fpc- |
15 |
DISTNAME= fpc-${PORTVERSION}.ELF |
20 |
DISTNAME= ${PKGNAMEPREFIX}${PORTVERSION}.${BUILDNAME} |
16 |
EXTRACT_SUFX= .tar |
21 |
EXTRACT_SUFX= .tar |
17 |
|
22 |
|
18 |
MAINTAINER= ports@FreeBSD.org |
23 |
MAINTAINER= acardenas@bsd.org.pe |
19 |
COMMENT= Free Pascal interface to ODBC |
24 |
COMMENT= Free Pascal interface to ODBC |
20 |
|
25 |
|
21 |
.include <bsd.port.pre.mk> |
26 |
RUN_DEPENDS= ppc386:${PORTSDIR}/lang/fpc |
22 |
|
|
|
23 |
LIB_DEPENDS= odbc.1:${PORTSDIR}/databases/unixODBC |
27 |
LIB_DEPENDS= odbc.1:${PORTSDIR}/databases/unixODBC |
24 |
BUILD_DEPENDS= ppc386:${PORTSDIR}/lang/fpc |
|
|
25 |
RUN_DEPENDS= ${BUILD_DEPENDS} |
26 |
.if ${OSVERSION} >= 500000 |
27 |
LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x |
28 |
.endif |
29 |
.if ${OSVERSION} < 470000 |
30 |
EXTRACT_DEPENDS= gtar:${PORTSDIR}/archivers/gtar |
31 |
TAR= ${LOCALBASE}/bin/gtar |
32 |
.endif |
33 |
USE_GMAKE= yes |
34 |
ONLY_FOR_ARCHS= i386 |
35 |
|
28 |
|
36 |
PLIST_SUB+= PORTVERSION=${PORTVERSION} |
29 |
ONLY_FOR_ARCHS= i386 |
|
|
30 |
NO_BUILD= yes |
37 |
|
31 |
|
38 |
MAKE_ENV+= PATH=${LOCALBASE}/bin:$$PATH \ |
32 |
EXAMPLESDIR= share/examples/${PKGNAMEPREFIX}${PORTVERSION} |
39 |
FPC=${LOCALBASE}/bin/ppc386 \ |
33 |
BUILDNAME= i386-freebsd |
40 |
INSTALL_BASEDIR=${PREFIX}/lib/fpc/${PORTVERSION} \ |
34 |
PLIST_SUB+= PORTVERSION=${PORTVERSION} \ |
41 |
INSTALL_BINDIR=${PREFIX}/bin \ |
35 |
BUILDNAME=${BUILDNAME} |
42 |
GCCLIBDIR=/usr/lib \ |
|
|
43 |
RELEASE=1 |
44 |
|
36 |
|
45 |
do-extract: |
37 |
do-extract: |
46 |
# unpack distribution |
38 |
# unpack distribution |
47 |
@${MKDIR} ${WRKSRC} |
39 |
@${MKDIR} ${WRKSRC} |
48 |
@${TAR} xf ${DISTDIR}/${DISTNAME}.tar --directory ${WRKSRC} |
40 |
@${TAR} xf ${DISTDIR}/${DISTNAME}.tar \ |
49 |
# unpack sources distribution |
41 |
--directory ${WRKSRC} |
50 |
@${MKDIR} ${WRKSRC}/sources |
42 |
@${TAR} xf ${WRKSRC}/binary.${BUILDNAME}.tar \ |
51 |
@${TAR} xf ${WRKSRC}/sources.tar --directory ${WRKSRC}/sources |
|
|
52 |
# further extract base sources |
53 |
# |
54 |
# odbc sources |
55 |
@${TAR} zxf ${WRKSRC}/sources/unitsodbcsrc.tar.gz \ |
56 |
--directory ${WRKSRC} |
43 |
--directory ${WRKSRC} |
57 |
|
44 |
|
58 |
post-patch: |
45 |
# unpack binary and odbc distribution |
59 |
# change to alter amount of optimization |
46 |
@${MKDIR} ${WRKSRC}/${PORTNAME} |
60 |
@${FIND} ${WRKSRC}/share/src/fpc-${PORTVERSION} -name \ |
47 |
@${TAR} zxf ${WRKSRC}/units-${PORTNAME}.${BUILDNAME}.tar.gz \ |
61 |
"Makefile*" | ${XARGS} ${REINPLACE_CMD} 's|-OG2p3|-OG2p1|g' |
48 |
--directory ${WRKSRC}/${PORTNAME} |
62 |
|
|
|
63 |
do-build: |
64 |
cd ${WRKSRC}/share/src/fpc-${PORTVERSION}/packages/base/odbc && \ |
65 |
${GMAKE} ${MAKE_ENV} all |
66 |
|
49 |
|
67 |
do-install: |
50 |
do-install: |
68 |
cd ${WRKSRC}/share/src/fpc-${PORTVERSION}/packages/base/odbc && \ |
51 |
.for DIRE in lib |
69 |
${GMAKE} ${MAKE_ENV} install |
52 |
@cd ${WRKSRC}/${PORTNAME}/${DIRE} && \ |
|
|
53 |
${FIND} * -type d -exec ${MKDIR} "{}" "${PREFIX}/${DIRE}/{}" \; && \ |
54 |
${FIND} * -type f -exec ${INSTALL_SCRIPT} "{}" "${PREFIX}/${DIRE}/{}" \; |
55 |
.endfor |
56 |
|
57 |
post-install: |
58 |
@cd ${WRKSRC}/${PORTNAME}/share && \ |
59 |
${FIND} * -type d -exec ${MKDIR} "{}" "${PREFIX}/share/{}" \; && \ |
60 |
${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${PREFIX}/share/{}" \; |
70 |
|
61 |
|
71 |
.include <bsd.port.post.mk> |
62 |
.include <bsd.port.mk> |