Fix variables for using correctly pkgconfig
This commit is contained in:
parent
d9f01cd025
commit
e89dbe27bc
|
@ -0,0 +1,48 @@
|
|||
--- engauge.orig.pro 2018-08-18 11:09:30.376816000 +0200
|
||||
+++ engauge.pro 2018-08-18 11:11:20.963693884 +0200
|
||||
@@ -848,8 +848,8 @@
|
||||
|
||||
jpeg2000 {
|
||||
message("JPEG2000 support: yes")
|
||||
- _OPENJPEG_INCLUDE = $$(OPENJPEG_INCLUDE)
|
||||
- _OPENJPEG_LIB = $$(OPENJPEG_LIB)
|
||||
+ _OPENJPEG_INCLUDE = $(OPENJPEG_INCLUDE)
|
||||
+ _OPENJPEG_LIB = $(OPENJPEG_LIB)
|
||||
isEmpty(_OPENJPEG_INCLUDE) {
|
||||
error("OPENJPEG_INCLUDE and OPENJPEG_LIB environment variables must be defined")
|
||||
} else {
|
||||
@@ -858,9 +858,9 @@
|
||||
}
|
||||
}
|
||||
DEFINES += "ENGAUGE_JPEG2000"
|
||||
- INCLUDEPATH += $$(OPENJPEG_INCLUDE) \
|
||||
+ INCLUDEPATH += $(OPENJPEG_INCLUDE) \
|
||||
src/Jpeg2000
|
||||
- LIBS += -L$$(OPENJPEG_LIB) -lopenjp2
|
||||
+ LIBS += -L$(OPENJPEG_LIB) -lopenjp2
|
||||
HEADERS += src/Jpeg2000/Jpeg2000.h \
|
||||
src/Jpeg2000/Jpeg2000Callbacks.h \
|
||||
src/Jpeg2000/Jpeg2000Color.h \
|
||||
@@ -877,8 +877,8 @@
|
||||
|
||||
pdf {
|
||||
message("PDF support: yes")
|
||||
- _POPPLER_INCLUDE = $$(POPPLER_INCLUDE)
|
||||
- _POPPLER_LIB = $$(POPPLER_LIB)
|
||||
+ _POPPLER_INCLUDE = $(POPPLER_INCLUDE)
|
||||
+ _POPPLER_LIB = $(POPPLER_LIB)
|
||||
isEmpty(_POPPLER_INCLUDE) {
|
||||
error("POPPLER_INCLUDE and POPPLER_LIB environment variables must be defined")
|
||||
} else {
|
||||
@@ -887,8 +887,8 @@
|
||||
}
|
||||
}
|
||||
DEFINES += "ENGAUGE_PDF"
|
||||
- LIBS += -L$$(POPPLER_LIB) -lpoppler-qt5
|
||||
- INCLUDEPATH += $$(POPPLER_INCLUDE)
|
||||
+ LIBS += -L$(POPPLER_LIB) -lpoppler-qt5
|
||||
+ INCLUDEPATH += $(POPPLER_INCLUDE)
|
||||
HEADERS += src/Dlg/DlgImportCroppingPdf.h \
|
||||
src/Import/ImportCroppingUtilPdf.h \
|
||||
src/Pdf/Pdf.h \
|
||||
|
|
@ -16,6 +16,9 @@ Source1: %{name}.appdata.xml
|
|||
Source2: %{name}.svg
|
||||
Source3: %{name}-with-name.svg
|
||||
|
||||
## Fix variables for using correctly pkgconfig
|
||||
Patch0: %{name}-fix_path_variables.patch
|
||||
|
||||
## Main building
|
||||
BuildRequires: gcc, gcc-c++
|
||||
BuildRequires: fftw-devel, log4cpp-devel, desktop-file-utils
|
||||
|
@ -125,6 +128,7 @@ HTML documentation of %{name}.
|
|||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%autopatch -p0
|
||||
|
||||
## Remove default -O1 optimization
|
||||
sed -e 's|-O1||g' -i engauge.pro
|
||||
|
@ -145,12 +149,10 @@ done
|
|||
|
||||
%build
|
||||
export ENGAUGE_RELEASE=1
|
||||
## Flags set by hand for EPEL6
|
||||
%if 0%{?fedora}
|
||||
##'pkg-config cflags' provides strange backslashes at the output's end of line
|
||||
export OPENJPEG_INCLUDE=%{_includedir}/openjpeg-`pkg-config --modversion libopenjp2 | sed 's/..$//'`
|
||||
export OPENJPEG_INCLUDE=`pkg-config --cflags libopenjp2 | sed 's/-I//'`
|
||||
export OPENJPEG_LIB=%{_libdir}
|
||||
export POPPLER_INCLUDE="%{_includedir}/poppler/qt5 -I%{_includedir}/poppler"
|
||||
export POPPLER_INCLUDE=`pkg-config --cflags poppler-qt5 | sed 's/-I//'`
|
||||
export POPPLER_LIB=%{_libdir}
|
||||
%{qmake_qt5} engauge.pro "CONFIG+=pdf jpeg2000" QT_SELECT=qt5 \
|
||||
%else
|
||||
|
|
Loading…
Reference in New Issue