Skip to content

Commit

Permalink
try patching makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mencian committed Oct 16, 2024
1 parent 7e3bde8 commit 97f06cb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
29 changes: 29 additions & 0 deletions recipes/fmsi/0001-Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/src/Makefile b/src/Makefile
index 6272ad5..473407a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,10 +1,10 @@
.PHONY: all clean
-CXX= g++
-CXXFLAGS= -g -Wall -Wno-unused-function -std=c++17 -O2
-PROG= ../fmsi
-INCLUDES-PATH?=.
+CXX= ${CXX}
+CXXFLAGS= -g -Wall -Wno-unused-function -std=c++17 -O3
+PROG= ${PREFIX}/bin/fmsi
+INCLUDES-PATH?= ${PREFIX}
INCLUDES= -I$(INCLUDES-PATH)/include -L$(INCLUDES-PATH)/lib
-LIBS= -lz -lsdsl -ldivsufsort -ldivsufsort64
+LIBS+= -lz -lsdsl -ldivsufsort -ldivsufsort64 -L${PREFIX}/lib

all:$(PROG)

@@ -14,7 +14,7 @@ include/sdsl/suffix_arrays.hpp: sdsl-lite/build/Makefile
$(MAKE) -C sdsl-lite/build install

sdsl-lite/build/Makefile:
- cd sdsl-lite/build && cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=../.. ..
+ cd sdsl-lite/build && cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${PREFIX} ..


$(PROG): $(wildcard *.cpp *.c *.h) ./include/sdsl/suffix_arrays.hpp version.h
7 changes: 7 additions & 0 deletions recipes/fmsi/0002-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
diff --git a/src/version b/src/version
index ee1372d..abd4105 100644
--- a/src/version
+++ b/src/version
@@ -1 +1 @@
-0.2.2
+${PKG_VERSION}
2 changes: 2 additions & 0 deletions recipes/fmsi/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ package:
source:
url: https://github.com/OndrejSladky/fmsi/archive/v{{ version }}.tar.gz
sha256: {{ sha256 }}
- 0001-Makefile.patch
- 0002-version.patch

build:
number: 0
Expand Down

0 comments on commit 97f06cb

Please sign in to comment.