void-packages/srcpkgs/texworks/patches/cross.patch
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

53 lines
2.2 KiB
Diff

--- a/modules/QtPDF/CMake/Modules/FindPoppler.cmake 2017-04-29 18:23:51.000000000 +0200
+++ b/modules/QtPDF/CMake/Modules/FindPoppler.cmake 2018-08-29 09:13:02.788284947 +0200
@@ -69,15 +69,7 @@
MESSAGE(STATUS "Could not find libpoppler." )
ENDIF ()
-# Scan poppler libraries for dependencies on Fontconfig
-INCLUDE(GetPrerequisites)
-MARK_AS_ADVANCED(gp_cmd)
-GET_PREREQUISITES("${POPPLER_BASE_LIBRARIES}" POPPLER_PREREQS TRUE FALSE "" "")
-IF ("${POPPLER_PREREQS}" MATCHES "fontconfig")
- SET(POPPLER_NEEDS_FONTCONFIG TRUE)
-ELSE ()
- SET(POPPLER_NEEDS_FONTCONFIG FALSE)
-ENDIF ()
+SET(POPPLER_NEEDS_FONTCONFIG TRUE)
FIND_PATH(POPPLER_QT_INCLUDE_DIR NAMES poppler-qt${QT_VERSION_MAJOR}.h poppler-link.h
--- a/CMakeLists.txt 2017-04-29 18:23:51.000000000 +0200
+++ b/CMakeLists.txt 2018-08-29 10:49:36.290088209 +0200
@@ -91,7 +91,6 @@
SET(TeXworks_VERSION ${TeXworks_VER_MAJOR}.${TeXworks_VER_MINOR}.${TeXworks_VER_PATCH})
# Make sure we have up-to-date git commit infos
-IF ( NOT CMAKE_CROSSCOMPILING )
IF ( WIN32 )
EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/getGitRevInfo.bat WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
ADD_CUSTOM_TARGET(GitRev ALL COMMAND ${CMAKE_SOURCE_DIR}/getGitRevInfo.bat WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Update git commit info")
@@ -99,7 +98,6 @@
EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/getGitRevInfo.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
ADD_CUSTOM_TARGET(GitRev ALL COMMAND ${CMAKE_SOURCE_DIR}/getGitRevInfo.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Update git commit info")
ENDIF ( WIN32 )
-ENDIF ( NOT CMAKE_CROSSCOMPILING)
MESSAGE( STATUS "Git commit info updated" )
# Recover git commit info from `src/GitRev.h`.
@@ -361,7 +359,6 @@
# Some header files contain components that must be dynamically generated. For
# example, `getDefaultBinPaths.sh` is a script that tries to figure out the
# appropriate path to TeX binaries on UNIX-like systems.
-IF ( UNIX AND NOT CMAKE_CROSSCOMPILING )
IF ( NOT EXISTS ${TeXworks_SOURCE_DIR}/src/DefaultBinaryPaths.h )
MESSAGE(STATUS "Generating DefaultBinaryPaths.h")
@@ -371,7 +368,6 @@
WORKING_DIRECTORY ${TeXworks_SOURCE_DIR}
)
ENDIF ()
-ENDIF ()
# Building
# ========