databases/sqlcached: Switch to sqlite3 and respect {C,LD}FLAGS

PR:		231992
Submitted by:	tobik
Approved by:	ivoras (maintainer, via mail)
This commit is contained in:
Tobias Kortkamp 2018-10-06 10:30:45 +00:00
parent 39be4b047e
commit dc48457bac
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481362
2 changed files with 23 additions and 7 deletions

View File

@ -3,18 +3,14 @@
PORTNAME= sqlcached
PORTVERSION= r6
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= databases net
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= ivoras@FreeBSD.org
COMMENT= Cache daemon using SQL for data manipulation
LIB_DEPENDS= libsqlite.so:databases/sqlite2
USES= readline ncurses tar:tgz
LDFLAGS+= -L${LOCALBASE}/lib
USES= localbase:ldflags ncurses readline sqlite tar:tgz
WRKSRC= ${WRKDIR}/${PORTNAME}
@ -26,7 +22,6 @@ PLIST_FILES= bin/${PORTNAME} etc/rc.d/${PORTNAME} \
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e 's|-lcurses|-lncurses|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} 's|/usr/local|${PREFIX}|' \
${WRKSRC}/FreeBSD/${PORTNAME}

View File

@ -0,0 +1,21 @@
--- Makefile.orig 2013-09-26 13:45:50 UTC
+++ Makefile
@@ -1,7 +1,5 @@
-MYCFLAGS=-O3 -Wall -I/usr/local/include #-g -pg
-MYLDFLAGS=-L/usr/local/lib -lsqlite #-g -pg
-#MYCFLAGS=-O3 -Wall -I/usr/local/include -DSQLITE3
-#MYLDFLAGS=-L/usr/local/lib -lsqlite3
+MYCFLAGS= ${CFLAGS} -DSQLITE3
+MYLDFLAGS= ${LDFLAGS} -lsqlite3
all: sqlcached sc_client sc_client_bench libsqlcached_client.so libsqlcached_client.a
@@ -20,7 +18,7 @@ server_protocol.o: server_protocol.c common.h
cc -o server_protocol.o -c server_protocol.c ${MYCFLAGS}
sc_client: client.o sqlcached_client.o
- cc -o sc_client client.o sqlcached_client.o ${MYLDFLAGS} -lreadline -lcurses
+ cc -o sc_client client.o sqlcached_client.o ${MYLDFLAGS} -lreadline -lncurses
client.o: client.c common.h
cc -o client.o -c client.c ${MYCFLAGS}