-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patch.mk: create target subdir if it is multilevel #1454
Conversation
Example: xvidcore. Its subdir is xvidcore/build/generic. This commit adds creation of xvidcore/build prior to moving a directory to xvidcore/build/generic.
In this case, subdir should be changed to the top level so that all files are tracked and able to be patched. |
Something like the below (untested): diff --git a/src/xvidcore.mk b/src/xvidcore.mk
index 3d8a4f2..94bf92d 100644
--- a/src/xvidcore.mk
+++ b/src/xvidcore.mk
@@ -5,7 +5,7 @@ PKG := xvidcore
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.3.4
$(PKG)_CHECKSUM := 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f
-$(PKG)_SUBDIR := xvidcore/build/generic
+$(PKG)_SUBDIR := xvidcore
$(PKG)_FILE := xvidcore-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://downloads.xvid.org/downloads/$($(PKG)_FILE)
$(PKG)_DEPS := gcc pthreads yasm
@@ -17,22 +17,21 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
- $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm",' '$(1)/configure.in'
- cd '$(1)' && autoreconf -fi
- cd '$(1)' && ./configure \
+ $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm",' '$(SOURCE_DIR)/build/generic/configure.in'
+ cd '$(SOURCE_DIR)/build/generic' && autoreconf -fi
+ cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/build/generic/configure' \
$(MXE_CONFIGURE_OPTS)
- $(MAKE) -C '$(1)' -j 1 BUILD_DIR='build' $(if $(BUILD_STATIC),SHARED,STATIC)_LIB=
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 $(if $(BUILD_STATIC),SHARED,STATIC)_LIB=
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
- $(INSTALL) -m644 '$(1)/../../src/xvid.h' '$(PREFIX)/$(TARGET)/include/'
+ $(INSTALL) -m644 '$(SOURCE_DIR)/src/xvid.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' '$(PREFIX)/$(TARGET)/bin'
- $(INSTALL) -m644 '$(1)/build/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/$(if $(BUILD_STATIC),lib,bin)/'
+ $(INSTALL) -m644 '$(BUILD_DIR)/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/$(if $(BUILD_STATIC),lib,bin)/'
$(if $(BUILD_STATIC), \
ln -sf '$(PREFIX)/$(TARGET)/lib/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/lib/libxvidcore.$(LIB_SUFFIX)', \
- mv '$(1)/build/xvidcore.dll.a' '$(1)/build/libxvidcore.dll.a' && \
- $(INSTALL) -m644 '$(1)/build/libxvidcore.dll.a' '$(PREFIX)/$(TARGET)/lib/')
+ $(INSTALL) -m644 '$(BUILD_DIR)/xvidcore.dll.a' '$(PREFIX)/$(TARGET)/lib/libxvidcore.dll.a')
endef
define $(PKG)_BUILD_x86_64-w64-mingw32
- $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm -DNO_PREFIX",' '$(1)/configure.in'
+ $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm -DNO_PREFIX",' '$(SOURCE_DIR)/build/generic/configure.in'
$($(PKG)_BUILD)
endef |
@tonytheodore See #1460 |
There are other packages with / in subdir: #1461 |
Example: xvidcore. Its subdir is xvidcore/build/generic.
This commit adds creation of xvidcore/build prior to moving
a directory to xvidcore/build/generic.