#!/bin/sh # ===================================================================== # Projet : DARKMAKE # Fichier : compile # Auteur : Nicolas "DarkHack" Chapuis (c) 2026 # ================== DARKHACK ================== # [ darkweb.fr - system online ] # Powered by Perplexity, your AI assistant # [https://www.perplexity.ai](https://www.perplexity.ai) # ============================================== # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ===================================================================== rootDarkMake="${rootDarkMake:-/etc/darkmake}" if ! type "shInclude" > /dev/null; then . /etc/darksh/lib/shTools shLog="${shLog:-"mpdecimal install"}" shDebugEnable="${shDebugEnable:-1}" shDebug "$*" fi autoPath="lib/system/mpdecimal" . "${rootDarkMake}/lib/autotools/libtool/install/basics" exit path_install_vars="${rootDarkMake}/lib/web/libxslt/global/install_vars" \ . ${rootDarkMake}/lib/autotools/pkg-config/bin/checks shLog="[ $pkgName/$pkgVersion ]" cd $pkgSrc addM4Dir() { ( dst="${1}" dir="${2}" subDir="${3}" if [ ! -d "${dir}" ];then echo "not dir:${dir}" >&2 else if [ ! -d "${dst}/${subDir}" ];then mkdir "${dst}/${subDir}";fi for founded in $(ls "${dir}/${subDir}");do if [ "." = "${founded}" ] || [ ".." = "${founded}" ];then continue;fi if [ -f "${dir}/${subDir}/${founded}" ];then # echo "copy ${subDir}/${founded}" >&2 cp "${dir}/${subDir}/${founded}" "${dst}/${subDir}" elif [ -d "${dir}/${subDir}/${founded}" ];then echo "analyse ${subDir}/${founded} => ${dst}/${subDir}/${founded}" >&2 addM4Dir "${dst}/${subDir}" "${dir}/${subDir}" "${founded}" fi done fi echo "${dst}/${subDir} " ) | tr -d '\n' } if [ ! -f "./configure" ];then filesToInit="" if [ ! -d "${pkgSrc}/m4" ];then mkdir "${pkgSrc}/m4";fi # for anDir in autoconf aclocal;do # if [ -d "/usr/local/share/${anDir}" ];then toAdd=$(addM4Dir "${pkgSrc}/m4" "/usr/local/share" "${anDir}"); # elif [ -d "/usr/share/${anDir}" ];then toAdd=$(addM4Dir "${pkgSrc}/m4" "/usr/share" "${anDir}");fi # if [ -n "${toAdd}" ];then # for m4toAdd in ${toAdd};do # # echo "m4toAdd:$m4toAdd"; # M4DIR="-I ${m4toAdd} ${M4DIR}" ## filesToInit="$filesToInit ${m4toAdd}/configure"; # done # fi # done ##exit 0 M4DIR="-I$pkgSrc -I$pkgSrc/m4 $M4DIR" for subFolder in $(find . | grep "Makefile.am" | rev | cut -d / -f 2- | rev | tr '\n' ' ');do if [ -f "$pkgSrc/$subFolder/configure.ac" ];then rm "$pkgSrc/$subFolder/configure";fi if [ "$subFolder" = "." ];then continue; else filesToInit="$filesToInit $pkgSrc/$subFolder/configure";fi done filesToInit="$filesToInit $pkgSrc/configure" filesToInit="$filesToInit" \ YACC="$YACC" INTLBISON="$INTLBISON" CC="$CC" \ GNULIB_SRCDIR="$GNULIB_SRCDIR" GNULIB_TOOL="$GNULIB_TOOL" \ LIBGNU_LIBS="$LIBGNU_LIBS" LIBGNU_CFLAGS="$LIBGNU_CFLAGS" LIBGNU_PATH="$LIBGNU_PATH" \ LIBTOOL_LIBS="$LIBTOOL_LIBS" LIBTOOL_CFLAGS="$LIBTOOL_CFLAGS" LIBTOOL_PATH="$LIBTOOL_PATH" LIBTOOL="$LIBTOOL" LIBTOOLIZE="$LIBTOOLIZE" \ LIBRARY_PATH="$LIBRARY_PATH" LD_RUN_PATH="$LD_RUN_PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \ M4DIR="$M4DIR" LIBS="$LIBS" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \ FORCEAUTOMAKE="y" \ pkgDirLog="$pkgDirLog" pkgSrc="$pkgSrc" pkgName="$pkgName" pkgVersion="$pkgVersion" ${rootDarkMake}/lib/autotools/libtool/install/init # pkgDirLog="$pkgDirLog" pkgSrc="$pkgSrc" pkgName="$pkgName" pkgVersion="$pkgVersion" ${rootDarkMake}/lib/autotools/autoconf/install/init # pkgDirLog="$pkgDirLog" pkgSrc="$pkgSrc" pkgName="$pkgName" pkgVersion="$pkgVersion" ${rootDarkMake}/lib/autotools/automake/install/init fi cd $pkgSrc #./configure --without-python > $pkgDirLog/configure.log 2>&1 #--system-libx264 shDebug 1 "================== CONFIGURE ========================" ./configure --help > $pkgDirLog/C0_configureHelp.log 2>&1 YACC="$YACC" INTLBISON="$INTLBISON" CC="$CC" \ GNULIB_SRCDIR="$GNULIB_SRCDIR" GNULIB_TOOL="$GNULIB_TOOL" \ LIBGNU_LIBS="$LIBGNU_LIBS" LIBGNU_CFLAGS="$LIBGNU_CFLAGS" LIBGNU_PATH="$LIBGNU_PATH" \ LIBTOOL_LIBS="$LIBTOOL_LIBS" LIBTOOL_CFLAGS="$LIBTOOL_CFLAGS" LIBTOOL_PATH="$LIBTOOL_PATH" LIBTOOL="$LIBTOOL" LIBTOOLIZE="$LIBTOOLIZE" \ LIBRARY_PATH="$LIBRARY_PATH" LD_RUN_PATH="$LD_RUN_PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \ M4DIR="$M4DIR" LIBS="$LIBS" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \ ./configure > $pkgDirLog/C1_configure.log 2>&1 tail -50l $pkgDirLog/C1_configure.log echo "Press any key to continue... ";read REPLY YACC="$YACC" INTLBISON="$INTLBISON" CC="$CC" \ GNULIB_SRCDIR="$GNULIB_SRCDIR" GNULIB_TOOL="$GNULIB_TOOL" \ LIBGNU_LIBS="$LIBGNU_LIBS" LIBGNU_CFLAGS="$LIBGNU_CFLAGS" LIBGNU_PATH="$LIBGNU_PATH" \ LIBTOOL_LIBS="$LIBTOOL_LIBS" LIBTOOL_CFLAGS="$LIBTOOL_CFLAGS" LIBTOOL_PATH="$LIBTOOL_PATH" LIBTOOL="$LIBTOOL" LIBTOOLIZE="$LIBTOOLIZE" \ LIBRARY_PATH="$LIBRARY_PATH" LD_RUN_PATH="$LD_RUN_PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \ M4DIR="$M4DIR" LIBS="$LIBS" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \ pkgDirLog="$pkgDirLog" pkgSrc="$pkgSrc" pkgName="$pkgName" pkgVersion="$pkgVersion" . ${rootDarkMake}/lib/autotools/make/install/stdCleanMakeInstall --check