imgui wrap from Wrap DB and build-source.sh rework
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>pull/445/head
parent
a27984f343
commit
b0ee2f749c
@ -1,15 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
VERSION=$(git describe --tags --dirty)
|
VERSION=$(git describe --tags --dirty)
|
||||||
NAME=MangoHud-$VERSION-Source
|
NAME=MangoHud-${VERSION}
|
||||||
|
TAR_NAME=${NAME}-Source.tar.xz
|
||||||
# create archive via git
|
DFSG_TAR_NAME=${NAME}-Source-DFSG.tar.xz
|
||||||
git archive HEAD --format=tar --prefix=${NAME}/ --output=${NAME}.tar
|
|
||||||
# remove unused minihook from source tarball
|
# remove existing files
|
||||||
tar -f ${NAME}.tar --delete ${NAME}/modules
|
rm -rf sourcedir
|
||||||
# create DFSG compliant version which excludes NVML
|
rm -rf ${NAME}
|
||||||
cp ${NAME}.tar ${NAME}-DFSG.tar
|
rm -f ${TAR_NAME}
|
||||||
tar -f ${NAME}-DFSG.tar --delete ${NAME}/include/nvml.h
|
rm -f ${DFSG_TAR_NAME}
|
||||||
# compress archives
|
|
||||||
gzip ${NAME}.tar
|
# create tarball with meson
|
||||||
gzip ${NAME}-DFSG.tar
|
meson sourcedir
|
||||||
|
meson dist --formats=xztar --include-subprojects --no-tests -C sourcedir
|
||||||
|
mv sourcedir/meson-dist/*.tar.xz ${TAR_NAME}
|
||||||
|
|
||||||
|
# create DFSG compliant version
|
||||||
|
# unpack since tarball is compressed
|
||||||
|
mkdir ${NAME}
|
||||||
|
tar -xf ${TAR_NAME} --strip 1 -C ${NAME}
|
||||||
|
# nvml.h is not DFSG compliant
|
||||||
|
rm ${NAME}/include/nvml.h
|
||||||
|
# minhook not needed
|
||||||
|
rm -r ${NAME}/modules/minhook
|
||||||
|
# vulkan headers from system
|
||||||
|
rm -r ${NAME}/subprojects/Vulkan-Headers-*
|
||||||
|
# remove some dear imgui clutter
|
||||||
|
rm -rf ${NAME}/subprojects/imgui-*/examples ${NAME}/subprojects/imgui-*/misc
|
||||||
|
# compress new sources
|
||||||
|
tar -cJf ${DFSG_TAR_NAME} ${NAME}
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
rm -r sourcedir
|
||||||
|
rm -r ${NAME}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
[wrap-git]
|
[wrap-file]
|
||||||
directory = imgui
|
directory = imgui-1.80
|
||||||
url = https://github.com/ocornut/imgui.git
|
source_url = https://github.com/ocornut/imgui/archive/v1.80.tar.gz
|
||||||
revision = 22ace4438c86b3137567c69346a3836d26ebf95c
|
source_filename = imgui-1.80.tar.gz
|
||||||
patch_url = https://flightlessmango.com/wraps/imgui.zip
|
source_hash = d7e4e1c7233409018437a646680316040e6977b9a635c02da93d172baad94ce9
|
||||||
patch_filename = imgui.zip
|
patch_url = https://wrapdb.mesonbuild.com/v1/projects/imgui/1.80/1/get_zip
|
||||||
patch_hash = 55e9f31b3edfe725e7271bd0dd06434ba2a3b6fdce476314947907a43e36b641
|
patch_filename = imgui-1.80-1-wrap.zip
|
||||||
|
patch_hash = 9b86a584968d3c4b0b0c0cd648013eb5b81aeb6789babe3c1097727a134efc7f
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
imgui = imgui_dep
|
||||||
|
Loading…
Reference in New Issue