Skip to content

Commit

Permalink
[foilnotes] Load libcrypto.so dynamically
Browse files Browse the repository at this point in the history
Either libcrypto.so.1.1 or libcrypto.so.10 whatever is available.
Doesn't apply to aarch64 because there was never such a thing as
64-bit release of Sailfish OS with libcrypto.so.10
  • Loading branch information
monich committed Nov 14, 2021
1 parent 157fd7a commit 765661a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 12 additions & 9 deletions app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ QT += qml quick sql
QMAKE_CXXFLAGS += -Wno-unused-parameter
QMAKE_CFLAGS += -Wno-unused-parameter

system("pkg-config openssl --atleast-version=1.1") {
message("Linking OpenSSL dynamically")
PKGCONFIG += libcrypto
} else {
message("Linking OpenSSL statically")
LIBS += $$[QT_INSTALL_LIBS]/libcrypto.a
PKGCONFIG += zlib
}

app_settings {
# This path is hardcoded in jolla-settings
TRANSLATIONS_PATH = /usr/share/translations
Expand All @@ -35,6 +26,11 @@ CONFIG(debug, debug|release) {
DEFINES += DEBUG HARBOUR_DEBUG
}

equals(QT_ARCH, arm64){
message(Linking with OpenSSL)
PKGCONFIG += libcrypto
}

# Directories
FOIL_UI_REL = foil-ui
FOIL_UI_DIR = $${_PRO_FILE_PWD_}/$${FOIL_UI_REL}
Expand Down Expand Up @@ -186,6 +182,13 @@ qml_components.files = $${HARBOUR_QML_COMPONENTS}
qml_components.path = /usr/share/$${TARGET}/qml/harbour
INSTALLS += qml_components

# openssl

!equals(QT_ARCH, arm64){
SOURCES += \
$${HARBOUR_LIB_SRC}/libcrypto.c
}

# Icons
ICON_SIZES = 86 108 128 172 256
for(s, ICON_SIZES) {
Expand Down
2 changes: 0 additions & 2 deletions rpm/harbour-foilnotes.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Source0: %{name}-%{version}.tar.gz

Requires: sailfishsilica-qt5
Requires: qt5-qtsvg-plugin-imageformat-svg
BuildRequires: openssl-static
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(sailfishapp)
Expand Down

0 comments on commit 765661a

Please sign in to comment.