Skip to content

Commit

Permalink
doublecmd: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwutz committed Oct 11, 2022
1 parent 11d9202 commit ed279a7
Showing 1 changed file with 206 additions and 21 deletions.
227 changes: 206 additions & 21 deletions doublecmd.be0
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,243 @@
# BEE_VERSION doublecmd-1.0.7-0

# SRCURL[0]="https://downloads.sourceforge.net/project/doublecmd/Double%20Commander%20Source/doublecmd-${PKGVERSION}-src.tar.gz"
SRCURL+=("https://beehive.molgen.mpg.de/31f7414f19bb0917afadf42069e05482/doublecmd-1.0.7-src.tar.gz")
#SRCURL+=("https://beehive.molgen.mpg.de/31f7414f19bb0917afadf42069e05482/doublecmd-1.0.7-src.tar.gz")

# git clone https://github.com/doublecmd/doublecmd.git doublecmd
SRCURL+=("https://beehive.molgen.mpg.de/b4dc381a2640a41cc881d7f41d0b8cc1/doublecmd-git.tar")

# https://downloads.sourceforge.net/project/freepascal/Source/3.2.2/fpc-3.2.2.source.tar.gz
#SRCURL+=("https://beehive.molgen.mpg.de/e7649ad0fc9230fdd9493a7fcabbd426/fpc-3.2.2.source.tar.gz")

# https://downloads.sourceforge.net/project/freepascal/Source/3.2.2/fpcbuild-3.2.2.tar.gz
SRCURL+=("https://beehive.molgen.mpg.de/3681ae4a208be4f64ec65e832a9a702d/fpcbuild-3.2.2.tar.gz")
#SRCURL+=("https://beehive.molgen.mpg.de/3681ae4a208be4f64ec65e832a9a702d/fpcbuild-3.2.2.tar.gz")

# https://sourceforge.net/projects/freepascal/files/Linux/3.2.2/fpc-3.2.2.x86_64-linux.tar/download
# SRCURL+=("https://beehive.molgen.mpg.de/0186779de0c9caee073fc1394afbee56/fpc-3.2.2.x86_64-linux.tar")

# https://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%202.2.2/lazarus-2.2.2-0.tar.gz
# SRCURL+=("https://beehive.molgen.mpg.de/96a1b21fc709daaa620b057ba22f8692/lazarus-2.2.2-0.tar.gz")

# git clone --recurse-submodules https://gitlab.com/freepascal.org/fpc/source.git/ fpcsrc
SRCURL+=("https://beehive.molgen.mpg.de/f7fd6c50cd6787d4a1a481ff41cbeba3/fpcsrc-git.tar")

# bootstrapper
# https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/bootstrappers_v1.0/fpcup-3_2_2-x86_64-linux-ppcx64
SRCURL+=("https://beehive.molgen.mpg.de/b1b37cb1366df1d7dabe64345590d225/fpcup-3_2_2-x86_64-linux-ppcx64 ppcx64")

# git clone --recurse-submodules https://gitlab.com/freepascal.org/lazarus/lazarus.git/ lazarus
SRCURL+=("https://beehive.molgen.mpg.de/9c502cc2018b6d0b84fc6898ce79208a/lazarus-git.tar")

# PATCHURL[0]=""

NPROC=$(nproc)

# build_in_sourcedir

#mee_extract() {
# bee_extract "${@}"
#}
MXDIFF=/dev/shm/mxdiff.dc.$$

mee_extract() {
for t in "${@}"; do
[[ $t =~ \.(tar.gz)$ ]] && X+=($t);
done
bee_extract "${X[@]}"

tar xf ${F}/doublecmd-git.tar --strip-components=1 -C ${S}

if [ ! -d ${B}/fpcupdeluxe ]; then
mkdir -p ${B}/fpcupdeluxe
tar xf ${F}/fpcsrc-git.tar -C ${B}/fpcupdeluxe
tar xf ${F}/lazarus-git.tar -C ${B}/fpcupdeluxe
fi
}

#mee_patch() {
# bee_patch "${@}"
# bee_patch "${@}"
#}


mee_configure_pre() {

cd ${S}/fpcbuild-3.2.2
# DEST=/home/wwwutz/fpcupdeluxe/
rm -rfv /root/.lazarus
find /etc /root -mtime 0 -ls > ${MXDIFF}.1
trap "find /etc /root -mtime 0 -ls > ${MXDIFF}.2;diff ${MXDIFF}.[12];rm -vf ${MXDIFF}.[12];" EXIT

mkdir -p ${B}/fpcupdeluxe/fpcbootstrap

cd ${B}/fpcupdeluxe

install -m755 -v ${F}/ppcx64 fpcbootstrap

cd ${B}/fpcupdeluxe/fpcsrc

git checkout release_3_2_2

patch -N -p1 -i /scratch/local/samplecfg.patch

local _MOPS=(
--jobs=${NPROC}
FPMAKEOPT=--threads=${NPROC}
PP=${B}/fpcupdeluxe/fpcbootstrap/ppcx64
FPCMAKE=${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmake
PPUMOVE=${B}/fpcupdeluxe/fpc/bin/x86_64-linux/ppumove
PREFIX=${B}/fpcupdeluxe/fpc
INSTALL_PREFIX=${B}/fpcupdeluxe/fpc
FPCDIR=${B}/fpcupdeluxe/fpcsrc
INSTALL_BINDIR=${B}/fpcupdeluxe/fpc/bin/x86_64-linux
OS_SOURCE=linux
CPU_SOURCE=x86_64
OS_TARGET=linux
CPU_TARGET=x86_64
REVSTR=release_3_2_2-0-g0d122c4953
REVINC=force
OPT="-Sg -vw-n-h-l-d-u-t-p-c-"
--directory=${B}/fpcupdeluxe/fpcsrc
)

pwd
# make "${_MOPS[@]}" distclean
make "${_MOPS[@]}" all install

exit
# Created launcher script for FPC:/home/wwwutz/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh
set -x
cat >${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh <<_EOT_
#!/bin/sh
${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc -n @${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg "\$@"
_EOT_

chmod 755 ${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh

cd ${B}/fpcupdeluxe/fpc

${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmkcfg -1 -d fpctargetos=linux -d basepath=${B}/fpcupdeluxe/fpc -o ${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fp.cfg

${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmkcfg -2 -d basepath=${B}/fpcupdeluxe/fpc -o ${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fp.ini

mkdir -vp ${B}/fpcupdeluxe/fpcpkgconfig

${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmkcfg -3 -p -d LocalRepository=${B}/fpcupdeluxe/packages.fppkg/ -d CompilerConfigDir=${B}/fpcupdeluxe/fpcpkgconfig/ -d GlobalPath=${B}/fpcupdeluxe/fpc/lib/fpc/\{CompilerVersion\}/ -d GlobalPrefix=${B}/fpcupdeluxe/fpc -d UserPathSuffix=users -d basepath=${B}/fpcupdeluxe/fpc -o ${B}/fpcupdeluxe/fpcpkgconfig/fppkg.cfg

${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmkcfg -4 -d GlobalPrefix=${B}/fpcupdeluxe/fpc -d fpcbin=${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh -d fpctargetos=linux -d fpctargetcpu=x86_64 -d basepath=${B}/fpcupdeluxe/fpc -o ${B}/fpcupdeluxe/fpcpkgconfig/default

# ${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmkcfg -d basepath=${B}/fpcupdeluxe/fpc -o ${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmkcfg -d basepath=${B}/fpcupdeluxe/fpc/lib/fpc/3.2.2 -o ${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg

# fehlte offenbar
cat >>${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg <<_EOT_

# Adding binary tools paths to plain bin dir and architecture bin dir so fpc 3.1+ fpcres etc can be found.
# /scratch/local2/bee-root/doublecmd/doublecmd-1.0.7-0/build/fpcupdeluxe/lazarus/ide/lazbuild.lpr(1878,1) Error: (9021) resource compiler "fpcres" not found, switching to external mode
-FD${B}/fpcupdeluxe/fpc/bin/x86_64-linux/
_EOT_

./autogen.sh
#
#
ln -vs ../../lib/fpc/3.2.2/ppcx64 bin/x86_64-linux/ppcx64
#
# lazarus
#

local _configure=(
--with-extra-only
--with-gtk=no
--prefix=${B}/extras
--disable-shared
cd ${B}/fpcupdeluxe/lazarus
git config --local advice.detachedHead false # no-ise

git checkout lazarus_2_2_4

local _MOPS=(
--directory=${B}/fpcupdeluxe/lazarus
FPC=${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.sh
PP=${B}/fpcupdeluxe/fpc/lib/fpc/3.2.2/ppcx64
USESVN2REVISIONINC=0
PREFIX=${B}/fpcupdeluxe/lazarus
INSTALL_PREFIX=${B}/fpcupdeluxe/lazarus
LAZARUS_INSTALL_DIR=${B}/fpcupdeluxe/lazarus/
FPCDIR=${B}/fpcupdeluxe/fpc
FPCMAKE=${B}/fpcupdeluxe/fpc/bin/x86_64-linux/fpcmake
PPUMOVE=${B}/fpcupdeluxe/fpc/bin/x86_64-linux/ppumove
OPT="-vw-n-h-l-d-u-t-p-c- -g -gl"
)
./configure "${_configure[@]}"

make ${BEE_MAKEFLAGS}
make "${_MOPS[@]}" lazbuild

return
#
# libqt5pas.so
#

cd ${B}/fpcupdeluxe/lazarus/lcl/interfaces/qt5/cbindings
qmake
make -j${NPROC}
mkdir -vp ${D}/usr/lib
cp -vax libQt5Pas.so* ${D}/usr/lib

make install
#lrwxrwxrwx 1 root root 18 Oct 4 14:04 libQt5Pas.so -> libQt5Pas.so.1.2.9
#lrwxrwxrwx 1 root root 18 Oct 4 14:04 libQt5Pas.so.1 -> libQt5Pas.so.1.2.9
#lrwxrwxrwx 1 root root 18 Oct 4 14:04 libQt5Pas.so.1.2 -> libQt5Pas.so.1.2.9
#-rwxr-xr-x 1 root root 3560720 Oct 4 14:04 libQt5Pas.so.1.2.9

####
}

#mee_configure() {
# bee_configure "${@}"
#}

mee_build() {
bee_build prefix=${PREFIX}
./build.sh beta qt5
cd ${S}


cat >$S/build.bee.mkbuild <<_EOF_
PATH=${B}/fpcupdeluxe/fpc/bin/x86_64-linux:${B}/fpcupdeluxe/lazarus:$PATH

INSTANTFPCCACHE=$B/instantfpccache

sed -e 's|export lazbuild=\\$.*|export lazbuild="lazbuild --pcp=$B --lazarusdir=$B/fpcupdeluxe/lazarus --verbose --verbose-pkgsearch "|' build.sh > build.bee.sh

cat >$B/environmentoptions.xml <<_EOXML_
<CONFIG>
<EnvironmentOptions>
<LazarusDirectory Value="$B/fpcupdeluxe/lazarus/"/>
<CompilerFilename Value="$B/fpcupdeluxe/fpc/bin/x86_64-linux/fpc"/>
</EnvironmentOptions>
</CONFIG>
_EOXML_

sh -x ./build.bee.sh components qt5

_EOF_

sh -x $S/build.bee.mkbuild

echo ${S}/build.bee.sh

exit

# FPCDIR=$B/fpcupdeluxe/fpc \
# PATH=${B}/fpcupdeluxe/fpc/bin/x86_64-linux:${B}/fpcupdeluxe/lazarus:$PATH \

INSTANTFPCCACHE=$B/instantfpccache \
./build.sh components qt5

local _MOPS=(
--lazarusdir=${B}/fpcupdeluxe/lazarus
--verbose --verbose --verbose-pkgsearch
--create-makefile
--pcp=${B}
--widgetset=qt5
)

# lazbuild "${_MOPS[@]}" src/doublecmd.lpi



# access("/scratch/local2/bee-root/doublecmd/doublecmd-1.0.7-0/build/fpcupdeluxe/lazarus/lazarus.cfg", F_OK) = -1 ENOENT (No such file or directory)

#cat $EtcSrcDir/environmentoptions.xml | \
# sed -e "s#__LAZARUSDIR__#$LazDestDirInstalled/#" \
# -e "s#__FPCSRCDIR__#/usr/share/fpcsrc/\$(FPCVER)/#" \
# > $LazBuildDir/etc/lazarus/environmentoptions.xml
#./tools/install/linux/environmentoptions.xml
#"__LAZARUSDIR__"
#"__FPCSRCDIR__"

}

#mee_install() {
Expand Down

0 comments on commit ed279a7

Please sign in to comment.