Package init

This commit is contained in:
hht8 2021-08-24 10:37:32 +08:00
parent aaeb77ac16
commit 44de63136a
3 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff -up highlight-3.42/src/core/platform_fs.cpp.list-available-langs highlight-3.42/src/core/platform_fs.cpp
--- highlight-3.42/src/core/platform_fs.cpp.list-available-langs 2019-01-11 11:42:30.948013206 +0100
+++ highlight-3.42/src/core/platform_fs.cpp 2019-01-11 11:44:25.206011626 +0100
@@ -222,8 +222,10 @@ void getFileNames ( const string &direct
if ( errno ) return;
// sort the current entries for fileName
- if ( firstEntry < fileName.size() )
- sort ( &fileName[firstEntry], &fileName[fileName.size() ] );
+ // https://gitlab.com/saalen/highlight/issues/84
+ // coredump with GLIBCXX_ASSERTIONS compiler option, use iterators if sort is needed
+ //if ( firstEntry < fileName.size() )
+ // sort ( &fileName[firstEntry], &fileName[fileName.size() ] );
// recurse into sub directories
// if not doing recursive, subDirectory is empty

BIN
highlight-3.42.tar.bz2 Normal file

Binary file not shown.

86
highlight.spec Normal file
View File

@ -0,0 +1,86 @@
Name: highlight
Summary: Universal source code to formatted text converter
Version: 3.42
Release: 1
Group: Development/Tools
License: GPLv3
URL: http://www.andre-simon.de/
Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
Patch01: highlight-3.42-list-available-langs.patch
BuildRequires: qt5-qtbase-devel
BuildRequires: lua-devel, boost-devel
BuildRequires: desktop-file-utils
%{?filter_setup:
%filter_from_provides /^perl(/d;
%filter_from_requires /^perl(/d;
%filter_from_requires /^\/bin\/lua/d;
%filter_setup
}
%description
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX,
XSL-FO, XML or ANSI escape sequences with syntax highlighting.
It supports several programming and markup languages.
Language descriptions are configurable and support regular expressions.
The utility offers indentation and reformatting capabilities.
It is easily possible to create new language definitions and colour themes.
%package gui
Summary: GUI for the hihghlight source code formatter
Requires: %{name} = %{version}-%{release}
%description gui
A Qt-based GUI for the highlight source code formatter source.
%prep
%autosetup -p1
%build
CFLAGS="$CFLAGS -fPIC %{optflags}"; export CFLAGS
CXXFLAGS="$CXXFLAGS -fPIC %{optflags}"; export CXXFLAGS
LDFLAGS="$LDFLAGS %{?__global_ldflags}"; export LDFLAGS
# Disable paralell builds, atempt to fixes FTBFS
#%make_build all gui %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
%make_build all gui CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
QMAKE="%{_qt5_qmake}" \
QMAKE_STRIP=
%install
%make_install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
make install-gui DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
highlight.desktop
%files
%{_bindir}/highlight
%{_datadir}/highlight/
%{_mandir}/man1/highlight.1*
%config(noreplace) %{_sysconfdir}/highlight/
%doc ChangeLog AUTHORS README* TODO extras/
%license COPYING
%files gui
%{_bindir}/highlight-gui
%{_datadir}/applications/highlight.desktop
%{_datadir}/pixmaps/highlight.xpm
%changelog
* Feb Aug 17 2021 Python_Bot <Python_Bot@openeuler.org> - 3.42-1
- Init Package