View | Details | Raw Unified | Return to bug 193028
Collapse All | Expand All

(-)databases/yasql/Makefile (-68 / +40 lines)
Lines 1-81 Link Here
1
# Created by: Thierry Thomas <thierry@pompo.net>
1
# Created by: Thierry Thomas <thierry@pompo.net>
2
# $FreeBSD: head/databases/yasql/Makefile 360690 2014-07-04 23:46:52Z adamw $
2
# $FreeBSD: head/databases/yasql/Makefile 360690 2014-07-04 23:46:52Z adamw $
3
3
4
PORTNAME=		yasql
4
PORTNAME=	yasql
5
PORTVERSION=		1.83
5
PORTVERSION=	1.83
6
PORTREVISION=		1
6
PORTREVISION=	1
7
CATEGORIES=		databases
7
CATEGORIES=	databases
8
MASTER_SITES=		SF
8
MASTER_SITES=	SF
9
9
10
MAINTAINER=		ports@FreeBSD.org
10
MAINTAINER=	ports@FreeBSD.org
11
COMMENT=		Yet Another SQL*Plus Replacement
11
COMMENT=	Yet Another SQL*Plus Replacement
12
13
BUILD_DEPENDS=	p5-DBD-Oracle>=0:${PORTSDIR}/databases/p5-DBD-Oracle	\
14
		p5-ReadLine-Gnu>=0:${PORTSDIR}/devel/p5-ReadLine-Gnu
15
RUN_DEPENDS:=	${BUILD_DEPENDS}
16
12
17
LICENSE=	GPLv2
13
LICENSE=	GPLv2
18
14
19
# Time::HiRes is used for high resolution benchmarking
15
RUN_DEPENDS=	p5-DBD-Oracle>0:${PORTSDIR}/databases/p5-DBD-Oracle \
20
.if !defined(WITHOUT_HIRES)
16
		p5-ReadLine-Gnu>0:${PORTSDIR}/devel/p5-ReadLine-Gnu
21
BUILD_DEPENDS+=	p5-Time-HiRes>=0:${PORTSDIR}/devel/p5-Time-HiRes
22
.endif
23
24
# Text::CSV_XS is required to output CSV or input from CSV files
25
.if !defined(WITHOUT_CSV)
26
BUILD_DEPENDS+=	p5-Text-CSV_XS>=0:${PORTSDIR}/textproc/p5-Text-CSV_XS
27
.endif
28
29
# Term::ReadKey is used for better input and output control
30
.if !defined(WITHOUT_READKEY)
31
BUILD_DEPENDS+=	p5-Term-ReadKey>=0:${PORTSDIR}/devel/p5-Term-ReadKey
32
.endif
33
34
HAS_CONFIGURE=	yes
35
CONFIGURE_ARGS=	--prefix=${PREFIX}
36
USES+=		perl5
37
ALL_TARGET=	default
38
17
39
SUB_FILES=	pkg-message
18
NO_ARCH=	yes
40
PKGMESSAGE=	${WRKDIR}/pkg-message
41
19
42
PLIST_FILES=	bin/yasql etc/yasql.conf.sample
20
USES=		perl5
21
GNU_CONFIGURE=	yes
22
ALL_TARGET=	default
43
23
44
MAN1=		yasql.1
24
SUB_FILES=	pkg-message
45
25
46
PORTDOCS=	README yasql.html
26
OPTIONS_DEFINE=		CSV HIRES READKEY
47
27
48
OPTIONS_DEFINE=	DOCS
28
CSV_DESC=		Support for in/out CSV files
49
29
CSV_BUILD_DEPENDS=	p5-Text-CSV_XS>0:${PORTSDIR}/textproc/p5-Text-CSV_XS
50
NO_STAGE=	yes
30
HIRES_DESC=		Support for high resolution benchmarking
51
pre-everything::
31
HIRES_BUILD_DEPENDS=	p5-Time-HiRes>0:${PORTSDIR}/devel/p5-Time-HiRes
52
	@${ECHO_MSG}
32
READKEY_DESC=		Better input and output control
53
	@${ECHO_MSG} "You may use the following build options:"
33
READKEY_BUILD_DEPENDS=	p5-Term-ReadKey>0:${PORTSDIR}/devel/p5-Term-ReadKey
54
	@${ECHO_MSG}
34
55
	@${ECHO_MSG} "WITHOUT_CSV	disable support for in/out CSV files"
35
post-patch:
56
	@${ECHO_MSG} "WITHOUT_HIRES	disable support for high resolution benchmarking"
36
	@${REINPLACE_CMD} -e \
57
	@${ECHO_MSG} "WITHOUT_READKEY	disable a better input and output control"
37
		's| /bin/more| /usr/bin/more|' ${WRKSRC}/yasql.conf
58
	@${ECHO_MSG}
38
59
39
post-build:
60
pre-configure:
40
	@${LN} -sf yasql.conf ${WRKSRC}/yasql.conf.sample
61
	${REINPLACE_CMD} 's,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/yasql.in
41
62
	${PERL} -pi -e 's|/bin/more|/usr/bin/more|' ${WRKSRC}/yasql.conf
42
do-install:
63
43
	(cd ${WRKSRC} && ${INSTALL_SCRIPT} yasql \
64
pre-install:
44
		${STAGEDIR}${PREFIX}/bin)
65
	if [ -f ${PREFIX}/etc/yasql.conf ] ; then \
45
	(cd ${WRKSRC} && ${INSTALL_MAN} yasql.1 \
66
		${MV} ${PREFIX}/etc/yasql.conf ${PREFIX}/etc/yasql.conf.precious ; \
46
		${STAGEDIR}${MANPREFIX}/man/man1)
67
	fi
47
	(cd ${WRKSRC} && ${INSTALL_MAN} yasql.conf.sample \
68
48
		${STAGEDIR}${PREFIX}/etc)
69
post-install:
49
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
70
	${MV} ${PREFIX}/etc/yasql.conf ${PREFIX}/etc/yasql.conf.sample
50
	(cd ${WRKSRC} && ${INSTALL_DATA} README yasql.html \
71
	${MKDIR} ${DOCSDIR}
51
		${STAGEDIR}${DOCSDIR})
72
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
73
	@if [ -f ${PREFIX}/etc/yasql.conf.precious ] ; then \
74
		${MV} ${PREFIX}/etc/yasql.conf.precious ${PREFIX}/etc/yasql.conf ; \
75
	else \
76
		${ECHO_MSG} ; \
77
		${CAT} ${PKGMESSAGE} ; \
78
		${ECHO_MSG} ; \
79
	fi
80
52
81
.include <bsd.port.mk>
53
.include <bsd.port.mk>
(-)databases/yasql/files/patch-yasql.in (-9 lines)
Lines 1-14 Link Here
1
--- yasql.in.orig	2005-05-09 18:01:47.000000000 +0200
1
--- yasql.in.orig	2005-05-09 18:01:47.000000000 +0200
2
+++ yasql.in	2010-11-18 15:10:32.000000000 +0100
2
+++ yasql.in	2010-11-18 15:10:32.000000000 +0100
3
@@ -60,7 +60,7 @@
4
 
5
 select((select(STDOUT), $| = 1)[0]); #unbuffer STDOUT
6
 
7
-$sysconfdir = "/etc";
8
+$sysconfdir = "%%LOCALBASE%%/etc";
9
 $sysconf = "$sysconfdir/yasql.conf";
10
 
11
 # try to include Time::HiRes for fine grained benchmarking
12
@@ -174,7 +174,7 @@
3
@@ -174,7 +174,7 @@
13
       wrn("Connection lost (timeout: $conf{connection_timeout})");
4
       wrn("Connection lost (timeout: $conf{connection_timeout})");
14
       quit(1);
5
       quit(1);
(-)databases/yasql/pkg-plist (+6 lines)
Line 0 Link Here
1
bin/yasql
2
@sample etc/yasql.conf.sample
3
man/man1/yasql.1.gz
4
%%PORTDOCS%%%%DOCSDIR%%/README
5
%%PORTDOCS%%%%DOCSDIR%%/yasql.html
6
%%PORTDOCS%%@dirrm %%DOCSDIR%%

Return to bug 193028