From af4644a624e7c078c8571bc145f32fa8fbc8f5d2 Mon Sep 17 00:00:00 2001 From: Sylvain BERTRAND Date: Mon, 28 Oct 2024 10:55:46 +0000 Subject: [PATCH] libXxf86vm:update and moved to /usr/lib --- builders/libXxf86vm-1.1.5/builder.sh | 45 +++++++ .../libXxf86vm-1.1.5/contrib/binutils-gcc-glibc.sh | 134 +++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 builders/libXxf86vm-1.1.5/builder.sh create mode 100755 builders/libXxf86vm-1.1.5/contrib/binutils-gcc-glibc.sh diff --git a/builders/libXxf86vm-1.1.5/builder.sh b/builders/libXxf86vm-1.1.5/builder.sh new file mode 100644 index 0000000..bdc515c --- /dev/null +++ b/builders/libXxf86vm-1.1.5/builder.sh @@ -0,0 +1,45 @@ +src_name=libXxf86vm +mkdir /nyan/$src_name +version=${pkg_name##*-} +slot=$version +mkdir /nyan/$src_name/$slot + +archive_name=$src_name-$version.tar.xz +url0=http://xorg.freedesktop.org/releases/individual/lib/$archive_name + +pkg_dir=$pkgs_dir_root/$src_name-$version +rm -Rf $pkg_dir +cp -f $src_dir_root/$archive_name $pkgs_dir_root +cd $pkgs_dir_root +tar xf $archive_name + +build_dir=$builds_dir_root/$src_name-$version +rm -Rf $build_dir +mkdir $build_dir +cd $build_dir + +PATH_SAVED=$PATH +export PATH="\ +/opt/toolchains/x64/elf/binutils-gcc/current/bin:\ +$PATH\ +" + +# install our build system +cp -r $nyan_root/builders/$pkg_name/contrib $pkg_dir + +$pkg_dir/contrib/binutils-gcc-glibc.sh + +rm -Rf /nyan/$src_name/$slot/include +cp -r $pkg_dir/include /nyan/$src_name/$slot/include + +rm -Rf /nyan/$src_name/$slot/lib +mkdir /nyan/$src_name/$slot/lib +cp -f $build_dir/libXxf86vm.so.1.0.0 /nyan/$src_name/$slot/lib/libXxf86vm.so.1.0.0 +ln -s libXxf86vm.so.1.0.0 /nyan/$src_name/$slot/lib/libXxf86vm.so + +ln -sTf /nyan/$src_name/current/lib/libXxf86vm.so.1.0.0 /usr/lib/libXxf86vm.so.1 + +export PATH=$PATH_SAVED +unset PATH_SAVED +rm -f $pkgs_dir_root/$archive_name +rm -Rf $build_dir $pkg_dir diff --git a/builders/libXxf86vm-1.1.5/contrib/binutils-gcc-glibc.sh b/builders/libXxf86vm-1.1.5/contrib/binutils-gcc-glibc.sh new file mode 100755 index 0000000..29a6974 --- /dev/null +++ b/builders/libXxf86vm-1.1.5/contrib/binutils-gcc-glibc.sh @@ -0,0 +1,134 @@ +#!/bin/sh + +# Look for "unset", you'll find the values you can override in $1 or +# $build_dir/local_conf.sh file, that in order to tune the script for your +# specific distro/needs. + +# Usage, drop the script at the top of mesa source tree, create somewhere else +# a build directory, cd into it, and call from there this script. + +# XXX: the defaults are for our custom distro +#=================================================================================================== +# build dir and src dir +build_dir=$(realpath .) +echo "build_dir=$build_dir" +# we are in contrib +src_dir=$(realpath $(dirname $0)/..) +echo "src_dir=$src_dir" +#=================================================================================================== +# the current configur-able variables may be individually overridden with the +# content of the file in $1 or $build_dir/local_conf.sh. Look for "unset" +# in those scripts to find what you can override to tune the build. +if test -f "$1"; then + . "$1" +else + if test -f $build_dir/local_conf.sh; then + . $build_dir/local_conf.sh + fi +fi +#=================================================================================================== +if test "${xorgproto_inc_dir-unset}" = unset; then +xorgproto_inc_dir=/nyan/xorgproto/current/include +fi +xorgproto_cppflags="-I$xorgproto_inc_dir" +#=================================================================================================== +if test "${libx11_inc_dir-unset}" = unset; then +libx11_inc_dir=/nyan/libX11/current/include +fi +libx11_cppflags="-I$libx11_inc_dir" +#--------------------------------------------------------------------------------------------------- +if test "${libx11_lib_dir-unset}" = unset; then +libx11_lib_dir=/nyan/libX11/current/lib +fi +libx11_ldflags="-L$libx11_lib_dir -lX11" +#=================================================================================================== +if test "${libxext_inc_dir-unset}" = unset; then +libxext_inc_dir=/nyan/libXext/current/include +fi +libxext_cppflags="-I$libxext_inc_dir" +#--------------------------------------------------------------------------------------------------- +if test "${libxext_lib_dir-unset}" = unset; then +libxext_lib_dir=/nyan/libXext/current/lib +fi +libxext_ldflags="-L$libxext_lib_dir -lXext" +#=================================================================================================== +if test "${cpp-unset}" = unset; then +cpp="gcc -E \ + -isystem /nyan/glibc/current/include \ + -isystem /nyan/linux-headers/current/include \ +" +fi +#=================================================================================================== +if test "${slib_cc-unset}" = unset; then +slib_cc="gcc -c \ + -isystem /nyan/glibc/current/include \ + -isystem /nyan/linux-headers/current/include \ + -std=c11 \ + -pipe -fPIC -O2 -ftls-model=global-dynamic -fpic \ + -static-libgcc" +fi +#=================================================================================================== +# we are still using the compiler driver, very bad idea +if test "${slib_ccld-unset}" = unset; then +slib_ccld="gcc \ + -shared \ + -static-libgcc \ + -B/nyan/glibc/current/lib \ + -L/nyan/glibc/current/lib \ + -Wl,-soname=libXxf86vm.so.1 \ + -Wl,--no-undefined \ + -Wl,-s \ +" +fi +#=================================================================================================== +glibc_cppflags="\ +-D_GNU_SOURCE \ +-DHAVE_DLFCN_H=1 \ +-DHAVE_INTTYPES_H=1 \ +-DHAVE_STDINT_H=1 \ +-DHAVE_STDIO_H=1 \ +-DHAVE_STDLIB_H=1 \ +-DHAVE_STRINGS_H=1 \ +-DHAVE_STRING_H=1 \ +-DHAVE_SYS_STAT_H=1 \ +-DHAVE_SYS_TYPES_H=1 \ +-DHAVE_UNISTD_H=1 \ +" +#=================================================================================================== +src_files="\ +$src_dir/src/XF86VMode.c \ +" +#=================================================================================================== +for f in $src_files +do + cpp_file=$(basename $f .c).cpp.c + printf "CPP $f -> $build_dir/$cpp_file\n" + $cpp -o $build_dir/$cpp_file $f \ + -I$src_dir/include \ + $glibc_cppflags \ + $xorgproto_cppflags \ + $libx11_cppflags \ + $libxext_cppflags +done +#=================================================================================================== +wait +#=================================================================================================== +os= +for f in $src_files +do + cpp_file=$(basename $f .c).cpp.c + o_file=$(basename $f .c).o + os="$os $o_file" + printf "SLIB_CC $build_dir/$cpp_file -> $build_dir/$o_file\n" + $slib_cc -o $build_dir/$o_file $build_dir/$cpp_file & +done +#=================================================================================================== +wait +#=================================================================================================== +# see $archive/src/Makefile.am for the libtool version +printf "SLIB_CCLD $build_dir/libXxf86vm.so.1.0.0\n" +$slib_ccld -o $build_dir/libXxf86vm.so.1.0.0 $os \ + $libxext_ldflags \ + $libx11_ldflags +#=================================================================================================== +wait -- 2.11.4.GIT