From b235a52d0858f88de1572639007d131cecf8f214 Mon Sep 17 00:00:00 2001 From: Jeffy Chen Date: Wed, 3 Nov 2021 11:36:10 +0800 Subject: [PATCH] Move scripts and sources to sub directories No functional changes. Change-Id: I2564bb309dc6bdff245b5689f49c6065e61b91c3 Signed-off-by: Jeffy Chen --- debian/rules | 4 ++-- meson.build | 17 ++++++++--------- fixup_dummy.sh => scripts/fixup_dummy.sh | 0 fixup_wrappers.sh => scripts/fixup_nowrap.sh | 0 fixup_nox11.sh => scripts/fixup_nox11.sh | 4 ++-- grabber.sh => scripts/grabber.sh | 0 normalize.sh => scripts/normalize.sh | 2 +- parse_name.sh => scripts/parse_name.sh | 0 update_debian.sh => scripts/update_debian.sh | 2 +- gbm_wrapper.c => src/gbm_wrapper.c | 0 10 files changed, 14 insertions(+), 15 deletions(-) rename fixup_dummy.sh => scripts/fixup_dummy.sh (100%) rename fixup_wrappers.sh => scripts/fixup_nowrap.sh (100%) rename fixup_nox11.sh => scripts/fixup_nox11.sh (54%) rename grabber.sh => scripts/grabber.sh (100%) rename normalize.sh => scripts/normalize.sh (95%) rename parse_name.sh => scripts/parse_name.sh (100%) rename update_debian.sh => scripts/update_debian.sh (95%) rename gbm_wrapper.c => src/gbm_wrapper.c (100%) diff --git a/debian/rules b/debian/rules index 32cbacc..8b478d5 100755 --- a/debian/rules +++ b/debian/rules @@ -12,7 +12,7 @@ override_dh_clean: override_dh_auto_configure: for target in $(TARGETS); do \ - export $$(./parse_name.sh $$target); \ + export $$(scripts/parse_name.sh $$target); \ dh_auto_configure --builddirectory=$$name -- \ -Darch=$${target%%-*} -Dgpu=$$gpu \ -Dversion=$$version -Dsubversion=$$subversion \ @@ -24,7 +24,7 @@ override_dh_auto_test: override_dh_auto_install: for target in $(TARGETS); do \ - export $$(./parse_name.sh $$target); \ + export $$(scripts/parse_name.sh $$target); \ dh_auto_install --builddirectory=$$name \ --destdir=debian/$$name; \ done diff --git a/meson.build b/meson.build index 3752a08..55c3928 100644 --- a/meson.build +++ b/meson.build @@ -26,7 +26,7 @@ optimize = get_option('optimize-level') message('Building for ' + '|'.join([arch, gpu, version, subversion, platform, optimize])) # Grab libraries with specified configs -cmd = run_command('grabber.sh', arch, gpu, version, subversion, platform, optimize) +cmd = run_command('scripts/grabber.sh', arch, gpu, version, subversion, platform, optimize) libs = cmd.stdout().strip().split('\n') # Use the first one as default library @@ -180,7 +180,7 @@ if run_command('grep', '-q', gbm_symbol, default_lib).returncode() == 0 libdl_dep = meson.get_compiler('c').find_library('dl', required : false) libgbm = shared_library( 'gbm', - 'gbm_wrapper.c', + 'src/gbm_wrapper.c', c_args : libgbm_cflags, include_directories : include_directories('include/GBM'), dependencies : [libdl_dep, libdrm_dep], @@ -281,16 +281,15 @@ endif # Install target libraries install_data(libs, install_dir : get_option('libdir')) -# Fixup dummy library -meson.add_install_script('fixup_dummy.sh', get_option('libdir'), default_lib) +# Replace dummy libmali library +meson.add_install_script('scripts/fixup_dummy.sh', get_option('libdir'), default_lib) if not wrappers -# Fixup wrappers - meson.add_install_script('fixup_wrappers.sh', get_option('libdir')) +# Disable wrappers + meson.add_install_script('scripts/fixup_nowrap.sh', get_option('libdir')) endif if platform != 'x11' and not vendor_package -# Fixup EGL header - meson.add_install_script('fixup_nox11.sh', - get_option('includedir') / 'EGL' / 'eglplatform.h') +# Disable X11 in EGL header + meson.add_install_script('scripts/fixup_nox11.sh', get_option('includedir')) endif diff --git a/fixup_dummy.sh b/scripts/fixup_dummy.sh similarity index 100% rename from fixup_dummy.sh rename to scripts/fixup_dummy.sh diff --git a/fixup_wrappers.sh b/scripts/fixup_nowrap.sh similarity index 100% rename from fixup_wrappers.sh rename to scripts/fixup_nowrap.sh diff --git a/fixup_nox11.sh b/scripts/fixup_nox11.sh similarity index 54% rename from fixup_nox11.sh rename to scripts/fixup_nox11.sh index 9ee78fc..37faa16 100755 --- a/fixup_nox11.sh +++ b/scripts/fixup_nox11.sh @@ -1,11 +1,11 @@ #!/bin/sh -e [ $# -lt 1 ] && { - echo "usage: $0 " + echo "usage: $0 " exit 1 } -HEADER="${MESON_INSTALL_DESTDIR_PREFIX:-/usr}/$1" +HEADER="${MESON_INSTALL_DESTDIR_PREFIX:-/usr}/$1/EGL/eglplatform.h" [ -f "$HEADER" ] && \ sed -i 's/MESA_EGL_NO_X11_HEADERS/__unix__/g' "$HEADER" diff --git a/grabber.sh b/scripts/grabber.sh similarity index 100% rename from grabber.sh rename to scripts/grabber.sh diff --git a/normalize.sh b/scripts/normalize.sh similarity index 95% rename from normalize.sh rename to scripts/normalize.sh index abb2d95..04efbd0 100755 --- a/normalize.sh +++ b/scripts/normalize.sh @@ -23,4 +23,4 @@ for lib in $LIBS; do done # Update debian control and rules -./update_debian.sh +scripts/update_debian.sh diff --git a/parse_name.sh b/scripts/parse_name.sh similarity index 100% rename from parse_name.sh rename to scripts/parse_name.sh diff --git a/update_debian.sh b/scripts/update_debian.sh similarity index 95% rename from update_debian.sh rename to scripts/update_debian.sh index dd52844..af43665 100755 --- a/update_debian.sh +++ b/scripts/update_debian.sh @@ -9,7 +9,7 @@ rm -f control.* # NOTE: Assuming multiarch packages could share debian files for target in $TARGETS; do - #export $(./parse_name.sh $target) + #export $(scripts/parse_name.sh $target) #package=$name package=$(basename ${target%.so}) control=control.$package diff --git a/gbm_wrapper.c b/src/gbm_wrapper.c similarity index 100% rename from gbm_wrapper.c rename to src/gbm_wrapper.c