libucontext: respect DESTDIR and PREFIX

Build out of source and avoid overriding termux_step_configure().
This commit is contained in:
Henrik Grimler 2022-02-11 14:37:15 +01:00
parent 88facc1a95
commit 99dd290fb0
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 10 additions and 16 deletions

View File

@ -1,14 +1,16 @@
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,9 @@
--- ../libucontext-libucontext-1.1/Makefile 2021-03-09 07:46:31.000000000 +0000
+++ ./Makefile 2022-02-11 13:33:41.720671627 +0000
@@ -14,10 +14,10 @@
override ARCH = arm
endif
LIBDIR := /lib
-LIBDIR := /lib
-INCLUDEDIR := /usr/include
-PKGCONFIGDIR := /usr/lib/pkgconfig
-CFLAGS := -ggdb3 -O2 -Wall
+INCLUDEDIR := /include
+PKGCONFIGDIR := /lib/pkgconfig
+LIBDIR := $(PREFIX)/lib
+INCLUDEDIR := $(PREFIX)/include
+PKGCONFIGDIR := $(PREFIX)/lib/pkgconfig
+CFLAGS ?= -ggdb3 -O2 -Wall
CPPFLAGS := -Iinclude -Iarch/${ARCH} -Iarch/common
EXPORT_UNPREFIXED := yes

View File

@ -3,15 +3,7 @@ TERMUX_PKG_DESCRIPTION="A library which provides the ucontext.h C API"
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/kaniini/libucontext/archive/refs/tags/libucontext-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=298201cef024aee29dfb81c3f1ef800047d5c799297651a60e2c53bb76956ea6
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="DESTDIR=$TERMUX_PREFIX"
termux_step_pre_configure() {
TERMUX_PKG_EXTRA_MAKE_ARGS+=" ARCH=$TERMUX_ARCH"
}
termux_step_configure() {
:
}
TERMUX_PKG_EXTRA_MAKE_ARGS="ARCH=$TERMUX_ARCH"