pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
fastp: Consolidate upstream Makefile improvements with FreeBSD port
Module Name: pkgsrc-wip
Committed By: Jason Bacon <bacon4000%gmail.com@localhost>
Pushed By: outpaddling
Date: Sat Jun 21 08:06:46 2025 -0500
Changeset: bf887e0aad3c72502c5b07a18049a4307685e1c0
Modified Files:
fastp/distinfo
fastp/patches/patch-Makefile
Log Message:
fastp: Consolidate upstream Makefile improvements with FreeBSD port
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bf887e0aad3c72502c5b07a18049a4307685e1c0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
fastp/distinfo | 2 +-
fastp/patches/patch-Makefile | 33 +++++++++++++++++++++++++--------
2 files changed, 26 insertions(+), 9 deletions(-)
diffs:
diff --git a/fastp/distinfo b/fastp/distinfo
index 927ff8419b..355925bbf7 100644
--- a/fastp/distinfo
+++ b/fastp/distinfo
@@ -3,5 +3,5 @@ $NetBSD$
BLAKE2s (fastp-1.0.1.tar.gz) = eb27c71cd7f68a53144c95fc627967d0393a46a05247bc1b618e97ce18f1d8e5
SHA512 (fastp-1.0.1.tar.gz) = f0f8151a4c4ec27061a09ee4fec039d8b3e594d466e2f5335277032280bb3b5b2a181d607cef9c602735b9ecaab47b24ce17da90f09e8b9ca18b608970b504ea
Size (fastp-1.0.1.tar.gz) = 167427 bytes
-SHA1 (patch-Makefile) = 97e7e159c94834535c42837923251344a9e5d667
+SHA1 (patch-Makefile) = 37765e872ceb5b2c6fabb68116c54f34bdfa0758
SHA1 (patch-src_main.cpp) = d28fb587c72b59f4c86bc51fd66874344a9dd43d
diff --git a/fastp/patches/patch-Makefile b/fastp/patches/patch-Makefile
index 5318780b1f..936a57b276 100644
--- a/fastp/patches/patch-Makefile
+++ b/fastp/patches/patch-Makefile
@@ -1,22 +1,31 @@
$NetBSD$
-# Respect build env, add destdir support
-
---- Makefile.orig 2025-05-28 22:47:44.000000000 +0000
+--- Makefile.orig 2025-06-17 10:24:56.000000000 +0000
+++ Makefile
-@@ -15,15 +15,18 @@ TARGET := fastp
+@@ -7,6 +7,8 @@ BINDIR ?= $(PREFIX)/bin
+ INCLUDE_DIRS ?=
+ LIBRARY_DIRS ?=
+
++STRIP ?= strip
++
+ SRC := $(wildcard ${DIR_SRC}/*.cpp)
+ OBJ := $(patsubst %.cpp,${DIR_OBJ}/%.o,$(notdir ${SRC}))
+
+@@ -15,15 +17,20 @@ TARGET := fastp
BIN_TARGET := ${TARGET}
CXX ?= g++
-CXXFLAGS := -std=c++11 -pthread -g -O3 -MD -MP -I${DIR_INC} $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir)) ${CXXFLAGS}
+# Optional flags that the user can override by setting CXXFLAGS in the
-+# env or make argument
-+CXXFLAGS ?= -g -O3
-+# Required flags
++# env or make argument. -pthread is a link flag, and serves no purpose
++# in the compile command. It is handled by -lpthread in LIBS.
++CXXFLAGS ?= -g -O3 -MD -MP
++# Append required flags to standard CXXFLAGS from env
+CXXFLAGS += -std=c++11 -I${DIR_INC} $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
LIBS := -lisal -ldeflate -lpthread
STATIC_FLAGS := -static -Wl,--no-as-needed -pthread
-LD_FLAGS := $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(LIBS) $(LD_FLAGS)
++# Append required flags to standard LDFLAGS from env
+LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(LIBS)
STATIC_LD_FLAGS := $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(STATIC_FLAGS) $(LIBS) $(STATIC_LD_FLAGS)
@@ -27,13 +36,21 @@ $NetBSD$
static:${OBJ}
$(CXX) $(OBJ) -o ${BIN_TARGET} $(STATIC_LD_FLAGS)
-@@ -39,7 +42,8 @@ clean:
+@@ -38,8 +45,16 @@ clean:
+ @rm -rf $(DIR_OBJ)
@rm -f $(TARGET)
++# Respect DESTDIR for staged installs (used by most package managers).
++# DESTDIR is empty by default, so this will install directly to BINDIR
++# unless DESTDIR is supplied by the user.
install:
- install $(TARGET) $(BINDIR)/$(TARGET)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ install $(TARGET) $(DESTDIR)$(BINDIR)
@echo "Installed."
++# Many package managers use install-strip target if debugging is not enabled
++install-strip: install
++ $(STRIP) $(DESTDIR)$(BINDIR)/$(TARGET)
++
-include $(OBJ:.o=.d)
Home |
Main Index |
Thread Index |
Old Index