mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-19 07:48:56 -04:00
app-i18n/zh-autoconvert: Fix QA issues and add missing useflags.
Revert "app-i18n/zh-autoconvert: Resolve wrong library installation path." This reverts commit b11fbba5e6c155753b756c143347ec21b7cddb78. app-i18n/zh-autoconvert: Fix missing symbolic links app-i18n/zh-autoconvert: Add missing useflags app-i18n/zh-autoconvert: make Makefile(s) respect compiler preferences
This commit is contained in:
parent
b11fbba5e6
commit
06a380afb9
@ -0,0 +1,45 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 66e8bea..e94aa3f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
CC=gcc
|
||||
-CFLAG=-O2 -g -Wall -Iinclude
|
||||
+# CFLAG=-O2 -g -Wall -Iinclude
|
||||
+CFLAGS+= -Wall -Iinclude
|
||||
LIBS= -Llib -lhz
|
||||
|
||||
.PHONY: all hzlib clean install-home install
|
||||
@@ -10,9 +11,9 @@ all: autob5 autogb hzlib
|
||||
autob5: autogb
|
||||
rm -f autob5;ln -s autogb autob5
|
||||
autogb:autogb.c hzlib
|
||||
- $(CC) $(CFLAG) $(LIBS) autogb.c -lhz -o autogb
|
||||
+ $(CC) $(CFLAGS) $(LIBS) $(LDFLAGS) autogb.c -lhz -o autogb
|
||||
autogb-static:autogb.c hzlib
|
||||
- $(CC) $(CFLAG) autogb.c lib/libhz.a -o autogb
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) autogb.c lib/libhz.a -o autogb
|
||||
hzlib:
|
||||
cd hzconvert;make
|
||||
xchat-plugins:
|
||||
diff --git a/hzconvert/Makefile b/hzconvert/Makefile
|
||||
index d8d4d19..2809d0a 100644
|
||||
--- a/hzconvert/Makefile
|
||||
+++ b/hzconvert/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
CC=gcc -I../include
|
||||
-CFLAGS=-O2 -Wall -g -D_REENTRANT
|
||||
+CFLAGS+=-Wall -D_REENTRANT
|
||||
SHARED_LIB=libhz.so
|
||||
SHARED_LIB_MAJOR=$(SHARED_LIB).0
|
||||
SHARED_LIB_MINOR=$(SHARED_LIB_MAJOR).0
|
||||
@@ -15,7 +15,7 @@ STATIC_OBJS=b2g.static.o b2u.static.o g2u.static.o hz2gb.static.o b2g_tables.sta
|
||||
all: share-lib static-lib
|
||||
|
||||
share-lib: $(OBJS)
|
||||
- gcc -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) -o ../lib/$(SHARED_LIB_MINOR) $(OBJS) -ldl
|
||||
+ gcc -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) $(LDFLAGS) -o ../lib/$(SHARED_LIB_MINOR) $(OBJS) -ldl
|
||||
rm -f ../lib/$(SHARED_LIB_MAJOR)
|
||||
rm -f ../lib/$(SHARED_LIB)
|
||||
cd ../lib;ln -s $(SHARED_LIB_MINOR) $(SHARED_LIB_MAJOR)
|
@ -5,4 +5,7 @@
|
||||
<email>r0bertz@gentoo.org</email>
|
||||
<name>Zhang Le</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="static-libs">Build static versions of dynamic libraries as well</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
@ -13,7 +13,7 @@ SRC_URI="mirror://debian/pool/main/z/${PN}/${PN}_${PV}.orig.tar.gz
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
IUSE="static-libs"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
@ -24,6 +24,7 @@ S=${WORKDIR}/${P/zh-}
|
||||
|
||||
PATCHES=(
|
||||
"${WORKDIR}/${PN}_${PV}-3.diff"
|
||||
"${FILESDIR}/make-makefile-respect-compiler-references.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@ -42,11 +43,15 @@ src_install() {
|
||||
dobin autogb
|
||||
dosym autogb /usr/bin/autob5
|
||||
|
||||
into /usr/lib
|
||||
if use static-libs; then
|
||||
dolib.a lib/libhz.a
|
||||
fi
|
||||
|
||||
dolib.so lib/libhz.so.0.0
|
||||
dosym libhz.so.0.0 /usr/lib/libhz.so.0
|
||||
dosym libhz.so.0 /usr/lib/libhz.so
|
||||
|
||||
LIBDIR_VAR="LIBDIR_${ABI}"
|
||||
dosym libhz.so.0.0 /usr/${!LIBDIR_VAR}/libhz.so.0
|
||||
dosym libhz.so.0 /usr/${!LIBDIR_VAR}/libhz.so
|
||||
|
||||
insinto /usr/include
|
||||
doins include/*.h
|
Loading…
x
Reference in New Issue
Block a user