mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 23:23:00 -04:00
net-libs/udt: switch to a fork
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
@@ -1 +1 @@
|
||||
DIST udt.sdk.4.11.tar.gz 147707 BLAKE2B 2be5c280d73138e7d508199aaaecc52ff5824266a92ab8718606c8c2688231ea609ff77d22dc85d2ee99c14edc170559cf9a544fd16bdc98953e1a871d257632 SHA512 fc555ce1ddde2a8bd92c8adf470fd69a9a35d0a679def32b6ddbb18d67dc8b7d9dd928d772dc8598f08b350130f1e90bb4be58c46252a0a79ecc99f61eca8a92
|
||||
DIST udt-4.11_p20181126.gh.tar.gz 148522 BLAKE2B 22a287c1c0dc395c2992bac918119862ed13f1eea59a7c3bd666f38747baac22cbbfe689d32bfe2a899259cb2d6f77c5e71055fe117eacba89295c24ffd8bfaf SHA512 1d0e34b29cfc6b8a738015327db36c6974e9c7ac618fc1af17d5bc9ea5d713cf0e156092a7922c68efa676d2974971c10472094957af3c08c6b623855df95c16
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
--- a/app/Makefile
|
||||
+++ b/app/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-C++ = g++
|
||||
+C++ = $(CXX)
|
||||
|
||||
ifndef os
|
||||
os = LINUX
|
||||
@@ -8,7 +8,7 @@
|
||||
arch = IA32
|
||||
endif
|
||||
|
||||
-CCFLAGS = -Wall -D$(os) -I../src -finline-functions -O3
|
||||
+CCFLAGS = -Wall -D$(os) -I../src $(CXXFLAGS)
|
||||
|
||||
ifeq ($(arch), IA32)
|
||||
CCFLAGS += -DIA32 #-mcpu=pentiumpro -march=pentiumpro -mmmx -msse
|
||||
@@ -26,7 +26,7 @@
|
||||
CCFLAGS += -DSPARC
|
||||
endif
|
||||
|
||||
-LDFLAGS = -L../src -ludt -lstdc++ -lpthread -lm
|
||||
+LDFLAGS += -L../src -ludt -lstdc++ -lpthread -lm
|
||||
|
||||
ifeq ($(os), UNIX)
|
||||
LDFLAGS += -lsocket
|
||||
@@ -43,18 +43,18 @@
|
||||
all: $(APP)
|
||||
|
||||
%.o: %.cpp
|
||||
- $(C++) $(CCFLAGS) $< -c
|
||||
+ $(C++) $(CCFLAGS) -fPIC $< -c
|
||||
|
||||
appserver: appserver.o
|
||||
- $(C++) $^ -o $@ $(LDFLAGS)
|
||||
+ $(C++) $^ -o $@ $(CCFLAGS) -fPIE $(LDFLAGS)
|
||||
appclient: appclient.o
|
||||
- $(C++) $^ -o $@ $(LDFLAGS)
|
||||
+ $(C++) $^ -o $@ $(CCFLAGS) -fPIE $(LDFLAGS)
|
||||
sendfile: sendfile.o
|
||||
- $(C++) $^ -o $@ $(LDFLAGS)
|
||||
+ $(C++) $^ -o $@ $(CCFLAGS) -fPIE $(LDFLAGS)
|
||||
recvfile: recvfile.o
|
||||
- $(C++) $^ -o $@ $(LDFLAGS)
|
||||
+ $(C++) $^ -o $@ $(CCFLAGS) -fPIE $(LDFLAGS)
|
||||
test: test.o
|
||||
- $(C++) $^ -o $@ $(LDFLAGS)
|
||||
+ $(C++) $^ -o $@ $(CCFLAGS) -fPIE $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(APP)
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-C++ = g++
|
||||
+C++ = $(CXX)
|
||||
|
||||
ifndef os
|
||||
os = LINUX
|
||||
@@ -8,7 +8,7 @@
|
||||
arch = IA32
|
||||
endif
|
||||
|
||||
-CCFLAGS = -fPIC -Wall -Wextra -D$(os) -finline-functions -O3 -fno-strict-aliasing -fvisibility=hidden
|
||||
+CCFLAGS = -fPIC -Wall -Wextra -D$(os) -fno-strict-aliasing -fvisibility=hidden $(CXXFLAGS)
|
||||
|
||||
ifeq ($(arch), IA32)
|
||||
CCFLAGS += -DIA32
|
||||
@@ -33,21 +33,18 @@
|
||||
OBJS = api.o buffer.o cache.o ccc.o channel.o common.o core.o epoll.o list.o md5.o packet.o queue.o window.o
|
||||
DIR = $(shell pwd)
|
||||
|
||||
-all: libudt.so libudt.a udt
|
||||
+all: libudt.so udt
|
||||
|
||||
%.o: %.cpp %.h udt.h
|
||||
- $(C++) $(CCFLAGS) $< -c
|
||||
+ $(C++) $(CCFLAGS) -fPIC $< -c
|
||||
|
||||
libudt.so: $(OBJS)
|
||||
ifneq ($(os), OSX)
|
||||
- $(C++) -shared -o $@ $^
|
||||
+ $(C++) $(CCFLAGS) $(LDFLAGS) -shared -fPIC -lpthread -Wl,-soname,libudt.so.0 -o $@ $^
|
||||
else
|
||||
$(C++) -dynamiclib -o libudt.dylib -lstdc++ -lpthread -lm $^
|
||||
endif
|
||||
|
||||
-libudt.a: $(OBJS)
|
||||
- ar -rcs $@ $^
|
||||
-
|
||||
udt:
|
||||
cp udt.h udt
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<name>Alessandro Barbieri</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://sourceforge.net/p/udt/bugs/</bugs-to>
|
||||
<remote-id type="sourceforge">udt</remote-id>
|
||||
<bugs-to>https://github.com/eisenhauer/udt4/issues</bugs-to>
|
||||
<remote-id type="github">eisenhauer/udt4</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="UDT is a UDP based data transport protocol"
|
||||
HOMEPAGE="http://udt.sourceforge.net"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${PN}.sdk.${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}4"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="4"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DOCS=( README.txt RELEASE_NOTES.txt draft-gg-udt-xx.txt )
|
||||
PATCHES=( "${FILESDIR}/${P}-makefiles.patch" )
|
||||
|
||||
src_compile(){
|
||||
tc-export CXX
|
||||
|
||||
# IA32 isn't a typo
|
||||
case ${ARCH} in
|
||||
x86) PLATFORM="IA32";;
|
||||
ppc|ppc64) PLATFORM="POWERPC";;
|
||||
amd64) PLATFORM="AMD64";;
|
||||
ia64) PLATFORM="IA64";;
|
||||
esac
|
||||
|
||||
case ${CHOST} in
|
||||
*-freebsd*|*-netbsd*|*-openbsd*|*-dragonfly*) OSNAME="BSD" ;;
|
||||
*-darwin*) OSNAME="OSX" ;;
|
||||
*) OSNAME="LINUX" ;;
|
||||
esac
|
||||
|
||||
MAKEOPTS="-j1" emake os="${OSNAME}" arch="${PLATFORM}"
|
||||
}
|
||||
|
||||
src_install(){
|
||||
dolib.so src/libudt.so
|
||||
dosym ./libudt.so /usr/$(get_libdir)/libudt.so.0
|
||||
exeinto "/usr/libexec/udt"
|
||||
doexe app/{appserver,appclient,sendfile,recvfile}
|
||||
|
||||
insinto /usr/include/udt
|
||||
doins src/udt.h
|
||||
|
||||
local HTML_DOCS=( doc/* )
|
||||
einstalldocs
|
||||
|
||||
cat <<EOF > udt.pc
|
||||
prefix=/usr
|
||||
libdir=\${prefix}/$(get_libdir)
|
||||
includedir=\${prefix}/include
|
||||
|
||||
Name: ${PN}
|
||||
Description: ${DESCRIPTION}
|
||||
Version: ${PV}
|
||||
URL: ${HOMEPAGE}
|
||||
Libs: -L\${libdir} -ludt
|
||||
Cflags: -I\${includedir}/udt
|
||||
EOF
|
||||
|
||||
insinto "/usr/$(get_libdir)/pkgconfig"
|
||||
doins udt.pc
|
||||
}
|
||||
34
net-libs/udt/udt-4.11_p20181126.ebuild
Normal file
34
net-libs/udt/udt-4.11_p20181126.ebuild
Normal file
@@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
COMMIT="0de191f6f43c0e03bb22eaf2ae4911ce5def0e10"
|
||||
|
||||
DESCRIPTION="UDT is a UDP based data transport protocol"
|
||||
HOMEPAGE="https://github.com/eisenhauer/udt4"
|
||||
SRC_URI="https://github.com/eisenhauer/udt4/archive/${COMMIT}.tar.gz -> ${PF}.gh.tar.gz"
|
||||
S="${WORKDIR}/${PN}4-${COMMIT}"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="4"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DOCS=( udt4/README.txt udt4/RELEASE_NOTES.txt udt4/draft-gg-udt-xx.txt )
|
||||
|
||||
src_configure(){
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DCMAKE_INSTALL_LIBDIR=$(get_libdir)
|
||||
-DUDT4_QUIET=OFF
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install(){
|
||||
cmake_src_install
|
||||
local HTML_DOCS=( udt4/doc/* )
|
||||
einstalldocs
|
||||
}
|
||||
Reference in New Issue
Block a user