Skip to content

Commit

Permalink
Use C++17 compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Dec 30, 2021
1 parent 8e8516e commit c54ed2b
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 50 deletions.
2 changes: 1 addition & 1 deletion bibledit.appdata.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (©) 2003-2020 Teus Benschop. -->
<!-- Copyright (©) 2003-2022 Teus Benschop. -->
<component type="desktop-application">
<id>org.bibledit.bibledit</id>
<metadata_license>FSFAP</metadata_license>
Expand Down
2 changes: 1 addition & 1 deletion bibledit.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** Copyright (©) 2003-2020 Teus Benschop.
** Copyright (©) 2003-2022 Teus Benschop.
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion bibledit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** Copyright (©) 2003-2020 Teus Benschop.
** Copyright (©) 2003-2022 Teus Benschop.
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions linux.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* Begin PBXFileReference section */
CA26345B1E4CF9C3005551AB /* COPYING */ = {isa = PBXFileReference; lastKnownFileType = text; path = COPYING; sourceTree = "<group>"; };
CA27A5562012151E00131AA0 /* bbe48x48.xpm */ = {isa = PBXFileReference; lastKnownFileType = text; path = bbe48x48.xpm; sourceTree = "<group>"; };
CA27A5572012154600131AA0 /* tarball.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = tarball.sh; sourceTree = "<group>"; };
CA27A5572012154600131AA0 /* tarball-macos.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "tarball-macos.sh"; sourceTree = "<group>"; };
CA4B84431FEEB85C00E35EFA /* bbe512x512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bbe512x512.png; sourceTree = "<group>"; };
CA80EC131B03C2EC000A2591 /* bibledit.cpp */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = bibledit.cpp; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
CA80EC141B03C31A000A2591 /* bibledit.desktop */ = {isa = PBXFileReference; lastKnownFileType = text; path = bibledit.desktop; sourceTree = "<group>"; };
Expand Down Expand Up @@ -38,7 +38,7 @@
CAA546062495302E00227263 /* screenshot-main.png */,
CAA546052495302E00227263 /* screenshot-workspace.png */,
CADE230525794151003E7581 /* tarball-linux.sh */,
CA27A5572012154600131AA0 /* tarball.sh */,
CA27A5572012154600131AA0 /* tarball-macos.sh */,
);
sourceTree = "<group>";
};
Expand Down
81 changes: 37 additions & 44 deletions tarball-linux.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (©) 2003-2020 Teus Benschop.
# Copyright (©) 2003-2022 Teus Benschop.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -32,15 +32,15 @@ if [ $? -ne 0 ]; then exit; fi
echo Working in $BUILDDIR


# Move the Bibledit Linux GUI sources into place.
echo Move the Bibledit Linux GUI sources into place
mv bibledit.h executable
if [ $? -ne 0 ]; then exit; fi

mv bibledit.cpp executable
if [ $? -ne 0 ]; then exit; fi


# Remove unwanted files.
echo Remove unwanted files
rm valgrind
rm bibledit
rm dev
Expand All @@ -58,42 +58,38 @@ rm -rf xcode
#xattr -r -c *


echo Install build requirements.
sudo apt --yes --assume-yes install build-essential
sudo apt --yes --assume-yes install autoconf
sudo apt --yes --assume-yes install automake
sudo apt --yes --assume-yes install autoconf-archive
sudo apt --yes --assume-yes install git
sudo apt --yes --assume-yes install zip
sudo apt --yes --assume-yes install pkgconf
sudo apt --yes --assume-yes install libcurl4-openssl-dev
sudo apt --yes --assume-yes install libssl-dev
sudo apt --yes --assume-yes install libatspi2.0-dev
sudo apt --yes --assume-yes install libgtk-3-dev
sudo apt --yes --assume-yes install libwebkit2gtk-3.0-dev
sudo apt --yes --assume-yes install libwebkit2gtk-4.0-dev
sudo apt --yes --assume-yes install curl
sudo apt --yes --assume-yes install make
sudo apt --yes --assume-yes install libmimetic-dev


# Clean source.
echo Install build requirements
#sudo apt --yes --assume-yes install build-essential
#sudo apt --yes --assume-yes install autoconf
#sudo apt --yes --assume-yes install automake
#sudo apt --yes --assume-yes install autoconf-archive
#sudo apt --yes --assume-yes install git
#sudo apt --yes --assume-yes install zip
#sudo apt --yes --assume-yes install pkgconf
#sudo apt --yes --assume-yes install libcurl4-openssl-dev
#sudo apt --yes --assume-yes install libssl-dev
#sudo apt --yes --assume-yes install libatspi2.0-dev
#sudo apt --yes --assume-yes install libgtk-3-dev
#sudo apt --yes --assume-yes install libwebkit2gtk-3.0-dev
#sudo apt --yes --assume-yes install libwebkit2gtk-4.0-dev
#sudo apt --yes --assume-yes install curl
#sudo apt --yes --assume-yes install make


echo Clean source
./configure
if [ $? -ne 0 ]; then exit; fi
make distclean
if [ $? -ne 0 ]; then exit; fi


# Enable the Linux configuration in config.h.
echo Enable the Linux configuration in config.h
sed -i.bak 's/ENABLELINUX=no/ENABLELINUX=yes/g' configure.ac
if [ $? -ne 0 ]; then exit; fi
sed -i.bak 's/# linux //g' configure.ac
if [ $? -ne 0 ]; then exit; fi
sed -i.bak 's/.*Tag8.*/AC_DEFINE([HAVE_LINUX], [1], [Enable installation on Linux])/g' configure.ac
if [ $? -ne 0 ]; then exit; fi
# A client does not use the mimetic library.
sed -i.bak '/mimetic/d' configure.ac
if [ $? -ne 0 ]; then exit; fi
# A client does not need the cURL library.
sed -i.bak '/curl/d' configure.ac
if [ $? -ne 0 ]; then exit; fi
Expand All @@ -104,8 +100,8 @@ sed -i.bak '/OPENSSL/d' configure.ac
if [ $? -ne 0 ]; then exit; fi


# Do not build the unit tests and the generator.
# Rename binary 'server' to 'bibledit'.
echo Do not build the unit tests and the generator
echo Rename binary 'server' to 'bibledit'
sed -i.bak 's/server unittest generate/bibledit/g' Makefile.am
if [ $? -ne 0 ]; then exit; fi
sed -i.bak 's/server_/bibledit_/g' Makefile.am
Expand All @@ -119,28 +115,25 @@ sed -i.bak 's/bible bibledit/bible/g' Makefile.am
if [ $? -ne 0 ]; then exit; fi
sed -i.bak '/EXTRA_DIST/ s/$/ *.desktop *.xpm *.png *.xml/' Makefile.am
if [ $? -ne 0 ]; then exit; fi
# Do not link with cURL and OpenSSL.
# Both are not used.
# As a result, a Debian package finds itself having unsatisfied dependencies.
# Removing the flags fixes that.
echo Do not link with cURL and OpenSSL
echo Both are not used
echo As a result, a Debian package finds itself having unsatisfied dependencies
echo Removing the flags fixes that
sed -i.bak '/CURL/d' Makefile.am
if [ $? -ne 0 ]; then exit; fi
sed -i.bak '/OPENSSL/d' Makefile.am
if [ $? -ne 0 ]; then exit; fi
# Add the additional Makefile.mk fragment for the Linux app.
echo Add the additional Makefile.mk fragment for the Linux app
echo '' >> Makefile.am
cat Makefile.mk >> Makefile.am
# Remove the consecutive blank lines introduced by the above edit operations.
echo Remove the consecutive blank lines introduced by the above edit operations
sed -i.bak '/./,/^$/!d' Makefile.am
if [ $? -ne 0 ]; then exit; fi
# A client does not require the mimetic library.
sed -i.bak '/mimetic/d' Makefile.am
if [ $? -ne 0 ]; then exit; fi
# Do not include "bibledit" in the distribution tarball.
echo Do not include "bibledit" in the distribution tarball
sed -i.bak '/^EXTRA_DIST/ s/bibledit//' Makefile.am
if [ $? -ne 0 ]; then exit; fi

# Remove bibledit-cloud man file.
echo Remove bibledit-cloud man file
rm man/bibledit-cloud.1
if [ $? -ne 0 ]; then exit; fi
sed -i.bak 's/man\/bibledit-cloud\.1//g' Makefile.am
Expand All @@ -153,20 +146,20 @@ sed -i.bak 's/man\/bibledit-cloud\.1//g' Makefile.am
# if [ $? -ne 0 ]; then exit; fi


# Remove .bak files.
echo Remove .bak files
find . -name "*.bak" -delete


# Create distribution tarball.
echo Create distribution tarball
./reconfigure
if [ $? -ne 0 ]; then exit; fi
./configure
if [ $? -ne 0 ]; then exit; fi
make dist --jobs=12
make dist --jobs=2
if [ $? -ne 0 ]; then exit; fi


# Copy the tarball to the Desktop
echo Copy the tarball to the Desktop
rm -f ~/bibledit*gz
cp *.gz ~
if [ $? -ne 0 ]; then exit; fi
3 changes: 2 additions & 1 deletion tarball.sh → tarball-macos.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (©) 2003-2020 Teus Benschop.
# Copyright (©) 2003-2022 Teus Benschop.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -25,6 +25,7 @@

echo Using Debian sid as builder
source ~/scr/sid-ip
if [ $? -ne 0 ]; then exit; fi


LINUXSOURCE=`dirname $0`
Expand Down

0 comments on commit c54ed2b

Please sign in to comment.