net-libs/usockets: removed unneeded BDEPEND

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
This commit is contained in:
Aisha Tammy
2020-06-26 06:19:48 -04:00
parent e2636325cf
commit 288701ce31
4 changed files with 34 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index fa6e2ff..529ed74 100644 index fa6e2ff..ca2603f 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -1,3 +1,14 @@ @@ -1,3 +1,14 @@
@@ -17,28 +17,21 @@ index fa6e2ff..529ed74 100644
# WITH_OPENSSL=1 enables OpenSSL 1.1+ support # WITH_OPENSSL=1 enables OpenSSL 1.1+ support
ifeq ($(WITH_OPENSSL),1) ifeq ($(WITH_OPENSSL),1)
override CFLAGS += -DLIBUS_USE_OPENSSL override CFLAGS += -DLIBUS_USE_OPENSSL
@@ -33,13 +44,33 @@ ifeq ($(WITH_ASAN),1) @@ -33,13 +44,27 @@ ifeq ($(WITH_ASAN),1)
endif endif
override CFLAGS += -std=c11 -Isrc override CFLAGS += -std=c11 -Isrc
-override LDFLAGS += uSockets.a -override LDFLAGS += uSockets.a
-# By default we build the uSockets.a static library -# By default we build the uSockets.a static library
-default: default:
+static:
rm -f *.o rm -f *.o
- $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c - $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
- $(AR) rvs uSockets.a *.o - $(AR) rvs uSockets.a *.o
+ $(CC) $(CFLAGS) -c src/*.c src/eventing/*.c src/crypto/*.c
+ $(AR) rvs libusockets.a *.o
+
+dynamic:
+ rm -f *.o
+ $(CC) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c $(CFLAGS) + $(CC) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c $(CFLAGS)
+ $(AR) rvs libusockets.a *.o
+ $(CC) -shared -fPIC -Wl,-soname,$(LIBTARGET) $(CFLAGS) -o $(LIBTARGET) *.o $(LDFLAGS) + $(CC) -shared -fPIC -Wl,-soname,$(LIBTARGET) $(CFLAGS) -o $(LIBTARGET) *.o $(LDFLAGS)
+ +
+default: static dynamic
+
+install: +install:
+ # install the folders needed (making sure that the exist) + # install the folders needed (making sure that the exist)
+ install -d "$(DESTDIR)$(libdir)" \ + install -d "$(DESTDIR)$(libdir)" \
@@ -56,7 +49,7 @@ index fa6e2ff..529ed74 100644
# Builds all examples # Builds all examples
.PHONY: examples .PHONY: examples
@@ -52,4 +83,5 @@ swift_examples: @@ -52,4 +77,5 @@ swift_examples:
clean: clean:
rm -f *.o rm -f *.o
rm -f *.a rm -f *.a

View File

@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata> <pkgmetadata>
<maintainer type="person"> <maintainer type="person">
<email>gentoo@aisha.cc</email> <email>gentoo@aisha.cc</email>
<name>Aisha Tammy</name> <name>Aisha Tammy</name>
</maintainer> </maintainer>
<use> <maintainer type="project">
<flag name="libuv">Enable bindings to use the libuv dispatcher</flag> <email>proxy-maint@gentoo.org</email>
</use> <name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="libuv">Enable bindings to use the libuv dispatcher</flag>
</use>
</pkgmetadata> </pkgmetadata>

View File

@@ -27,7 +27,6 @@ DEPEND="ssl? (
) )
libuv? ( dev-libs/libuv[static-libs?] ) libuv? ( dev-libs/libuv[static-libs?] )
" "
BDEPEND="${DEPEND}"
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
PATCHES=( PATCHES=(
@@ -36,19 +35,18 @@ PATCHES=(
src_compile() { src_compile() {
# the Makefile uses environment variables # the Makefile uses environment variables
emake -j1 \ emake LIBusockets_VERSION=${PV} \
LIBusockets_VERSION=${PV} \ WITH_OPENSSL=$(usex ssl 1 0) \
WITH_OPENSSL=$(usex ssl 1 0) \ WITH_LIBUV=$(usex libuv 1 0) \
WITH_LIBUV=$(usex libuv 1 0) \ default
default
} }
src_install() { src_install() {
emake -j1 \ emake libdir="/usr/$(get_libdir)" \
libdir="/usr/$(get_libdir)" \ prefix="/usr" \
prefix="/usr" DESTDIR="${D}" \ DESTDIR="${D}" \
LIBusockets_VERSION=${PV} \ LIBusockets_VERSION=${PV} \
install install
einstalldocs einstalldocs
if ! use static-libs; then if ! use static-libs; then
rm "${D}/usr/$(get_libdir)/libusockets.a" || die rm "${D}/usr/$(get_libdir)/libusockets.a" || die

View File

@@ -27,7 +27,6 @@ DEPEND="ssl? (
) )
libuv? ( dev-libs/libuv[static-libs?] ) libuv? ( dev-libs/libuv[static-libs?] )
" "
BDEPEND="${DEPEND}"
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
PATCHES=( PATCHES=(
@@ -36,19 +35,18 @@ PATCHES=(
src_compile() { src_compile() {
# the Makefile uses environment variables # the Makefile uses environment variables
emake -j1 \ emake LIBusockets_VERSION=${PV} \
LIBusockets_VERSION=${PV} \ WITH_OPENSSL=$(usex ssl 1 0) \
WITH_OPENSSL=$(usex ssl 1 0) \ WITH_LIBUV=$(usex libuv 1 0) \
WITH_LIBUV=$(usex libuv 1 0) \ default
default
} }
src_install() { src_install() {
emake -j1 \ emake libdir="/usr/$(get_libdir)" \
libdir="/usr/$(get_libdir)" \ prefix="/usr" \
prefix="/usr" DESTDIR="${D}" \ DESTDIR="${D}" \
LIBusockets_VERSION=${PV} \ LIBusockets_VERSION=${PV} \
install install
einstalldocs einstalldocs
if ! use static-libs; then if ! use static-libs; then
rm "${D}/usr/$(get_libdir)/libusockets.a" || die rm "${D}/usr/$(get_libdir)/libusockets.a" || die