diff --git a/print/Makefile b/print/Makefile index 7b3b608a4c7f..b20e01b15ae9 100644 --- a/print/Makefile +++ b/print/Makefile @@ -1,270 +1,271 @@ COMMENT = Desktop publishing SUBDIR += R-cran-knitr SUBDIR += R-cran-tinytex SUBDIR += a2pdf SUBDIR += a2ps SUBDIR += abcm2ps SUBDIR += adobe-cmaps SUBDIR += afm SUBDIR += alignmargins SUBDIR += ansiprint SUBDIR += asprint SUBDIR += auctex SUBDIR += bibcursed SUBDIR += bibview SUBDIR += brlaser SUBDIR += c2ps SUBDIR += catdvi SUBDIR += cdlabelgen SUBDIR += cups SUBDIR += cups-bjnp SUBDIR += cups-filters SUBDIR += cups-fxlinuxprint SUBDIR += cups-pdf SUBDIR += cups-pk-helper SUBDIR += cups-smb-backend SUBDIR += deforaos-pdfviewer SUBDIR += derelict-ft SUBDIR += detex SUBDIR += dot2tex SUBDIR += dvi2tty SUBDIR += dvips2ascii SUBDIR += dvisvg SUBDIR += dymo-cups-drivers SUBDIR += easylatex SUBDIR += enscript-a4 SUBDIR += enscript-letter SUBDIR += enscript-letterdj SUBDIR += epson-inkjet-printer-201207w SUBDIR += epson-inkjet-printer-201401w SUBDIR += epson-inkjet-printer-201601w SUBDIR += epson-inkjet-printer-escpr SUBDIR += epson-inkjet-printer-escpr2 SUBDIR += epsonepl SUBDIR += fig2dev SUBDIR += flpsed SUBDIR += font-amsfonts SUBDIR += font2svg SUBDIR += fontforge SUBDIR += foo2zjs SUBDIR += foomatic-db SUBDIR += foomatic-db-engine SUBDIR += foomatic-db-hpijs SUBDIR += foomatic-filters SUBDIR += fpc-libcups SUBDIR += fpdf SUBDIR += freetype2 SUBDIR += ft2demos SUBDIR += ghostscript7-base SUBDIR += ghostscript7-commfont SUBDIR += ghostscript7-jpnfont SUBDIR += ghostscript7-korfont SUBDIR += ghostscript7-x11 SUBDIR += ghostscript8-base SUBDIR += ghostscript8-x11 SUBDIR += ghostscript9-agpl-base SUBDIR += ghostscript9-agpl-x11 SUBDIR += ghostscript9-base SUBDIR += ghostscript9-x11 SUBDIR += gimp-gutenprint SUBDIR += gl2ps SUBDIR += gsfonts SUBDIR += gspdf SUBDIR += gtklp SUBDIR += gutenprint SUBDIR += gv SUBDIR += harfbuzz SUBDIR += harfbuzz-cairo SUBDIR += harfbuzz-icu SUBDIR += hp2xx SUBDIR += hplip SUBDIR += hplip-plugin SUBDIR += hs-hscolour SUBDIR += html2latex SUBDIR += html2ps SUBDIR += hyperlatex SUBDIR += indexinfo SUBDIR += kde_poster SUBDIR += latex-beamer SUBDIR += latex-biber SUBDIR += latex-ltablex SUBDIR += latex-resume SUBDIR += latex2rtf SUBDIR += latexdiff SUBDIR += libharu SUBDIR += libijs SUBDIR += libmspub01 SUBDIR += libotf SUBDIR += libpagemaker SUBDIR += libpaper SUBDIR += libraqm SUBDIR += libspectre SUBDIR += lilypond SUBDIR += lilypond-devel SUBDIR += limereport SUBDIR += linux-c7-cups-libs SUBDIR += linux-c7-freetype SUBDIR += linux-c7-harfbuzz SUBDIR += linux-jabref SUBDIR += lout SUBDIR += lprps SUBDIR += lyx SUBDIR += magicfilter SUBDIR += makeindex SUBDIR += mftrace SUBDIR += miktex SUBDIR += min12xxw SUBDIR += mp-a4 SUBDIR += mp-letter SUBDIR += mpage SUBDIR += muttprint SUBDIR += nenscript SUBDIR += okc321 SUBDIR += openprinting SUBDIR += p5-Font-FreeType SUBDIR += p5-Net-CUPS SUBDIR += p5-Net-Printer SUBDIR += p5-PDF-Template SUBDIR += p5-PDFLib SUBDIR += p5-PostScript SUBDIR += p5-PostScript-PPD SUBDIR += p5-PostScript-Simple SUBDIR += p5-Text-PDF SUBDIR += p5-XML-ApacheFOP SUBDIR += p5-XML-Handler-AxPoint SUBDIR += p910nd SUBDIR += panda SUBDIR += papersize-default-a4 SUBDIR += papersize-default-letter SUBDIR += paps SUBDIR += pcal SUBDIR += pdf-redact-tools SUBDIR += pdf-renderer SUBDIR += pdf-tools SUBDIR += pdf4tcl SUBDIR += pdfarranger SUBDIR += pdfbox SUBDIR += pdfchain SUBDIR += pdflib SUBDIR += pdflib-perl SUBDIR += pdfmixtool SUBDIR += pdfstitch SUBDIR += pdftk SUBDIR += pear-File_PDF SUBDIR += pfbtopfa SUBDIR += photoprint SUBDIR += pic2fig SUBDIR += pkfonts118 SUBDIR += pkfonts240 SUBDIR += pkfonts300 SUBDIR += pkfonts360 SUBDIR += pkfonts400 SUBDIR += pkfonts600 SUBDIR += pnm2ppa SUBDIR += posterazor SUBDIR += print-manager SUBDIR += ps2eps SUBDIR += pscal SUBDIR += psdim SUBDIR += pslib SUBDIR += pstotext SUBDIR += psutils SUBDIR += py-collidoscope SUBDIR += py-dehinter SUBDIR += py-font-v SUBDIR += py-fontaine SUBDIR += py-fontbakery SUBDIR += py-fontparts SUBDIR += py-fontpens SUBDIR += py-fonttools SUBDIR += py-fpdf SUBDIR += py-freetype-py SUBDIR += py-frescobaldi SUBDIR += py-glyphsets SUBDIR += py-glyphtools SUBDIR += py-pollyreports SUBDIR += py-preppy SUBDIR += py-psautohint SUBDIR += py-pycups SUBDIR += py-pydyf SUBDIR += py-pypdf SUBDIR += py-pypdf2 SUBDIR += py-pypdf3 SUBDIR += py-python-ly SUBDIR += py-relatorio SUBDIR += py-reportlab SUBDIR += py-rtf SUBDIR += py-ttfautohint-py SUBDIR += py-ufolib2 SUBDIR += py-uharfbuzz SUBDIR += py-vharfbuzz SUBDIR += py-weasyprint SUBDIR += qpdf SUBDIR += qpdfview SUBDIR += qt5-printsupport SUBDIR += rlpr SUBDIR += rtf2latex2e SUBDIR += rubygem-afm SUBDIR += rubygem-color SUBDIR += rubygem-color-tools SUBDIR += rubygem-color_diff SUBDIR += rubygem-pdf-core SUBDIR += rubygem-pdf-reader SUBDIR += rubygem-pdf-writer SUBDIR += rubygem-prawn SUBDIR += rubygem-prawn-core SUBDIR += rubygem-prawn-flexible-table SUBDIR += rubygem-prawn-format SUBDIR += rubygem-prawn-graph SUBDIR += rubygem-prawn-icon SUBDIR += rubygem-prawn-js SUBDIR += rubygem-prawn-layout SUBDIR += rubygem-prawn-security SUBDIR += rubygem-prawn-svg SUBDIR += rubygem-prawn-table SUBDIR += rubygem-prawn-templates SUBDIR += rubygem-prawn_shapes SUBDIR += rubygem-rbpdf SUBDIR += rubygem-rbpdf-font SUBDIR += rubygem-ttfunk SUBDIR += scribus-devel SUBDIR += sgf2tex SUBDIR += shrinkpdf SUBDIR += simple-fb2-reader + SUBDIR += sioyek SUBDIR += splix SUBDIR += system-config-printer SUBDIR += t1utils SUBDIR += tex-basic-engines SUBDIR += tex-dvipdfmx SUBDIR += tex-dvipsk SUBDIR += tex-formats SUBDIR += tex-jadetex SUBDIR += tex-luatex SUBDIR += tex-ptexenc SUBDIR += tex-xdvik SUBDIR += tex-xetex SUBDIR += tex-xmltex SUBDIR += texinfo SUBDIR += texlive-base SUBDIR += texlive-docs SUBDIR += texlive-full SUBDIR += texlive-texmf SUBDIR += texlive-texmf-source SUBDIR += texlive-tlmgr SUBDIR += texvc SUBDIR += tgif2tex SUBDIR += transfig SUBDIR += trueprint SUBDIR += ttf2pt1 SUBDIR += ttfautohint SUBDIR += txtbdf2ps SUBDIR += typetools SUBDIR += utopia SUBDIR += xmbibtex SUBDIR += xpdfopen SUBDIR += xreader SUBDIR += xtexsh SUBDIR += yatex .include diff --git a/print/sioyek/Makefile b/print/sioyek/Makefile new file mode 100644 index 000000000000..7bf63885e131 --- /dev/null +++ b/print/sioyek/Makefile @@ -0,0 +1,40 @@ +PORTNAME= sioyek +DISTVERSIONPREFIX= v +DISTVERSION= 2.0.0 +CATEGORIES= print + +MAINTAINER= fuz@FreeBSD.org +COMMENT= PDF viewer with focus on technical books and research papers +WWW= https://sioyek.info + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libmupdf.so:graphics/mupdf \ + libharfbuzz.so:print/harfbuzz \ + libfreetype.so:print/freetype2 \ + libjbig2dec.so:graphics/jbig2dec \ + libmujs.so:lang/mujs \ + libopenjp2.so:graphics/openjpeg + +USES= desktop-file-utils jpeg gl qmake qt:5 sqlite +USE_GITHUB= yes +GH_ACCOUNT= ahrm +USE_GL= gl +USE_QT= 3d buildtools:build core gui network opengl widgets + +post-extract: +.for f in sqlite3.h sqlite3ext.h sqlite3.c shell.c + ${RM} ${WRKSRC}/pdf_viewer/$f +.endfor + +pre-configure: + ${REINPLACE_CMD} -e 's,%%ETCDIR%%,${ETCDIR},' \ + -e 's,%%DATADIR%%,${DATADIR},' ${WRKSRC}/pdf_viewer/main.cpp + +post-install: +.for f in keys prefs + ${MV} ${STAGEDIR}${ETCDIR}/$f.config ${STAGEDIR}${ETCDIR}/$f.config.sample +.endfor + +.include diff --git a/print/sioyek/distinfo b/print/sioyek/distinfo new file mode 100644 index 000000000000..74be77e7dd4f --- /dev/null +++ b/print/sioyek/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1677891935 +SHA256 (ahrm-sioyek-v2.0.0_GH0.tar.gz) = 92398b6da5e297c59f22cd3c6b562194846f28bc17bb4ae9432869aafeb5df17 +SIZE (ahrm-sioyek-v2.0.0_GH0.tar.gz) = 4900368 diff --git a/print/sioyek/files/patch-pdf__viewer__build__config.pro b/print/sioyek/files/patch-pdf__viewer__build__config.pro new file mode 100644 index 000000000000..c70267963043 --- /dev/null +++ b/print/sioyek/files/patch-pdf__viewer__build__config.pro @@ -0,0 +1,28 @@ +--- pdf_viewer_build_config.pro.orig 2022-12-16 16:06:01 UTC ++++ pdf_viewer_build_config.pro +@@ -28,8 +28,6 @@ HEADERS += pdf_viewer/book.h \ + pdf_viewer/checksum.h \ + pdf_viewer/new_file_checker.h \ + pdf_viewer/coordinates.h \ +- pdf_viewer/sqlite3.h \ +- pdf_viewer/sqlite3ext.h \ + pdf_viewer/ui.h \ + pdf_viewer/path.h \ + pdf_viewer/utf8.h \ +@@ -55,7 +53,6 @@ SOURCES += pdf_viewer/book.cpp \ + pdf_viewer/checksum.cpp \ + pdf_viewer/new_file_checker.cpp \ + pdf_viewer/coordinates.cpp \ +- pdf_viewer/sqlite3.c \ + pdf_viewer/ui.cpp \ + pdf_viewer/path.cpp \ + pdf_viewer/utils.cpp \ +@@ -82,7 +79,7 @@ unix:!mac { + } else { + DEFINES += NON_PORTABLE + DEFINES += LINUX_STANDARD_PATHS +- LIBS += -ldl -lmupdf -lmupdf-third -lgumbo -lharfbuzz -lfreetype -ljbig2dec -ljpeg -lmujs -lopenjp2 -lz ++ LIBS += -ldl -lmupdf -lmupdf-third -lharfbuzz -lfreetype -ljbig2dec -ljpeg -lmujs -lopenjp2 -lz -lsqlite3 + } + + isEmpty(PREFIX){ diff --git a/print/sioyek/files/patch-pdf__viewer_main.cpp b/print/sioyek/files/patch-pdf__viewer_main.cpp new file mode 100644 index 000000000000..2fb5adc397e4 --- /dev/null +++ b/print/sioyek/files/patch-pdf__viewer_main.cpp @@ -0,0 +1,22 @@ +--- pdf_viewer/main.cpp.orig 2023-03-04 14:34:21 UTC ++++ pdf_viewer/main.cpp +@@ -296,7 +296,7 @@ void configure_paths(){ + user_config_paths.push_back(mac_standard_config_path.slash(L"prefs_user.config")); + #endif + +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + QStringList all_config_paths = QStandardPaths::standardLocations(QStandardPaths::AppConfigLocation); + for (int i = all_config_paths.size()-1; i >= 0; i--) { + user_config_paths.push_back(Path(all_config_paths.at(i).toStdWString()).slash(L"prefs_user.config")); +@@ -306,8 +306,8 @@ void configure_paths(){ + #ifdef LINUX_STANDARD_PATHS + Path home_path(QDir::homePath().toStdWString()); + Path standard_data_path = home_path.slash(L".local").slash(L"share").slash(L"sioyek"); +- Path standard_config_path = Path(L"/etc/sioyek"); +- Path read_only_data_path = Path(L"/usr/share/sioyek"); ++ Path standard_config_path = Path(L"%%ETCDIR%%"); ++ Path read_only_data_path = Path(L"%%DATADIR%%"); + standard_data_path.create_directories(); + + default_config_path = standard_config_path.slash(L"prefs.config"); diff --git a/print/sioyek/files/patch-pdf__viewer_utils.cpp b/print/sioyek/files/patch-pdf__viewer_utils.cpp new file mode 100644 index 000000000000..f5214ad89f03 --- /dev/null +++ b/print/sioyek/files/patch-pdf__viewer_utils.cpp @@ -0,0 +1,11 @@ +--- pdf_viewer/utils.cpp.orig 2023-03-04 13:46:24 UTC ++++ pdf_viewer/utils.cpp +@@ -1194,7 +1194,7 @@ void sleep_ms(unsigned int ms) { + #ifdef Q_OS_WIN + Sleep(ms); + #else +- struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; ++ struct timespec ts = { static_cast(ms / 1000), static_cast((ms % 1000) * 1000 * 1000) }; + nanosleep(&ts, NULL); + #endif + } diff --git a/print/sioyek/pkg-descr b/print/sioyek/pkg-descr new file mode 100644 index 000000000000..97cdabd10541 --- /dev/null +++ b/print/sioyek/pkg-descr @@ -0,0 +1,36 @@ +Sioyek is a PDF viewer with a focus on technical books and research papers. + +Searchable + Quickly search your previously opened documents, table of + contents, bookmarks, and highlights. Sioyek can even generate + the table of contents if the document doesn't have one! + +Smart Jump + You can preview or jump to references (e.g. bibliography, figures, + equations, etc.) even when the document doesn't have links. You + can also search references in google scholar with one click! + +Portals + You can create portals from parts of documents to other parts + displayed in a second window. So when you are reading a paragraph + that is talking about a figure, table, algorithm, theorem, etc. + you don't have to keep jumping between the two locations. + +Marks and Bookmarks + Mark locations with one-character symbols and then quickly jump + back to them. You can also create bookmarks which are like marks, + but use a descriptive text instead of a symbol and can be searched. + +Keyboard Focused + While sioyek fully supports many mouse actions, it is still + possible to use sioyek only using a keyboard. This includes + functionality such as text selection too! + +Synctex + Sioyek autoreloads the document so you can preview the changes + as you edit the latex file. You can also jump between the + corresponding locations in PDF and latex files with one click. + +Other features include configurability, extensibility with external +commands and scripts, text highlighting, a discoverable command palette, +and a visual ruler highlighting the current line. diff --git a/print/sioyek/pkg-plist b/print/sioyek/pkg-plist new file mode 100644 index 000000000000..405d13c1b80c --- /dev/null +++ b/print/sioyek/pkg-plist @@ -0,0 +1,19 @@ +bin/sioyek +@sample %%ETCDIR%%/keys.config.sample +@sample %%ETCDIR%%/prefs.config.sample +share/applications/sioyek.desktop +share/pixmaps/sioyek-icon-linux.png +%%DATADIR%%/shaders/custom_colors.fragment +%%DATADIR%%/shaders/dark_mode.fragment +%%DATADIR%%/shaders/debug.fragment +%%DATADIR%%/shaders/highlight.fragment +%%DATADIR%%/shaders/separator.fragment +%%DATADIR%%/shaders/simple.fragment +%%DATADIR%%/shaders/simple.vertex +%%DATADIR%%/shaders/stencil.fragment +%%DATADIR%%/shaders/stencil.vertex +%%DATADIR%%/shaders/undendered_page.fragment +%%DATADIR%%/shaders/unrendered_page.fragment +%%DATADIR%%/shaders/vertical_bar.fragment +%%DATADIR%%/shaders/vertical_bar_dark.fragment +%%DATADIR%%/tutorial.pdf