mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
sysutils/gdisk: fix build with utf16 option
PR: 197006 Submitted by: John Hein (based on)
This commit is contained in:
parent
9db3421b45
commit
6e1673294c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=378065
@ -23,7 +23,11 @@ OPTIONS_DEFINE= CGDISK UTF16
|
||||
OPTIONS_SUB= yes
|
||||
CGDISK_DESC= Curses-based interactive program
|
||||
UTF16_DESC= Support for Unicode partition names
|
||||
UTF16_CPPFLAGS+= -DUSE_UTF16
|
||||
UTF16_LDFLAGS+= -licuio
|
||||
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
MAKEFILE= Makefile.freebsd
|
||||
|
||||
PROGRAM_LIST= fixparts gdisk sgdisk
|
||||
@ -40,18 +44,10 @@ LIB_DEPENDS+= libicuuc.so:${PORTSDIR}/devel/icu
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|/usr/include/||' ${WRKSRC}/guid.h
|
||||
${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/${MAKEFILE}
|
||||
|
||||
.if ! ${PORT_OPTIONS:MCGDISK}
|
||||
${REINPLACE_CMD} -e '/^all:/s| cgdisk||' ${WRKSRC}/${MAKEFILE}
|
||||
.endif
|
||||
|
||||
.if ! ${PORT_OPTIONS:MUTF16}
|
||||
${REINPLACE_CMD} -e 's| -D USE_UTF16||' \
|
||||
-e 's| -licuio||' ${WRKSRC}/${MAKEFILE}
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
.for i in ${PROGRAM_LIST}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/sbin
|
||||
|
@ -1,10 +1,37 @@
|
||||
--- Makefile.freebsd 2011-09-11 00:51:13.000000000 +0000
|
||||
+++ Makefile.freebsd 2011-09-18 20:22:41.000000000 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
+++ Makefile.freebsd 2015-01-22 02:35:12.000000000 -0700
|
||||
@@ -1,8 +1,8 @@
|
||||
-CC=gcc
|
||||
-CXX=g++
|
||||
+CC?=gcc
|
||||
+CXX?=g++
|
||||
CFLAGS+=-D_FILE_OFFSET_BITS=64
|
||||
CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/usr/local/include
|
||||
#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include
|
||||
#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/usr/local/include
|
||||
-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include
|
||||
+CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 ${CPPFLAGS}
|
||||
LDFLAGS+=
|
||||
LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
|
||||
MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
|
||||
@@ -15,18 +15,18 @@
|
||||
|
||||
gdisk: $(LIB_OBJS) gdisk.o gpttext.o
|
||||
# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o -L/usr/local/lib $(LDFLAGS) -licuio -luuid -o gdisk
|
||||
- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o -L/usr/local/lib $(LDFLAGS) -luuid -o gdisk
|
||||
+ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
|
||||
|
||||
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
|
||||
# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o -L/usr/local/lib $(LDFLAGS) -licuio -luuid -lncurses -o cgdisk
|
||||
- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o -L/usr/local/lib $(LDFLAGS) -luuid -lncurses -o cgdisk
|
||||
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
|
||||
|
||||
sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
|
||||
# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o -L/usr/local/lib $(LDFLAGS) -luuid -licuio -lpopt -o sgdisk
|
||||
- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o -L/usr/local/lib $(LDFLAGS) -luuid -lpopt -o sgdisk
|
||||
+ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
|
||||
|
||||
fixparts: $(MBR_LIB_OBJS) fixparts.o
|
||||
- $(CXX) $(MBR_LIB_OBJS) fixparts.o -L/usr/local/lib $(LDFLAGS) -o fixparts
|
||||
+ $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
|
||||
|
||||
lint: #no pre-reqs
|
||||
lint $(SRCS)
|
||||
|
Loading…
Reference in New Issue
Block a user