diff --git a/app-editors/qvim/additional-files/qvim.rdef.in b/app-editors/qvim/additional-files/qvim.rdef.in new file mode 100644 index 000000000..dd18523ec --- /dev/null +++ b/app-editors/qvim/additional-files/qvim.rdef.in @@ -0,0 +1,53 @@ + +resource app_flags B_MULTIPLE_LAUNCH; + +resource app_signature "@APP_SIGNATURE@"; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "VIM Editor", + long_info = "VI Improved Editor by Bram Moolenaar et al." +}; + +resource file_types message { + "types" = "text", + "types" = "text/plain", + "types" = "text/x-source-code", + "types" = "text/x-patch", + "types" = "text/html", + "types" = "text/xml", + "types" = "text/x-makefile", + "types" = "text/x-jamfile" +}; + +resource vector_icon { + $"6E636966050501020006023B8CFD3CB8E4BF59B63E2F604BACDB47A13E00FFFF" + $"FFFF909DA702000603BAF8BA3CE3F6BF8EB9BDA8484BC75C4AEA1200C1C7CC79" + $"D9E0E5FFC1C7CC020006020000003DC000C000000000004C000049FFFF00B3FF" + $"B3FF026C52020006023BD04F3BD04FBED4133ED4134B6000462FB00053AB53FF" + $"007F00060618FFFCFFFF63FF282528252725262726262627262B262B262C282D" + $"272D282D2B2B582B582B592D5A2C5A2D5A2F5A2F5A305ABA2659315ABA26595E" + $"2D5E2D5F2C5F2A5F2B5F2A5F275F275F265D255E255D254A254A254925482748" + $"264827482B482B482C4A2D492D4A2D4C3A3F2D3C2D3C2D3D2D3E2B3E2C3E2B3E" + $"273E273E263C253D253C250618FFFCFFFF63FF28252825272526272626262726" + $"2B262B262C282D272D282D2B2B582B582B592D5A2C5A2D5A2F5A2F5A305ABA26" + $"59315ABA26595E2D5E2D5F2C5F2A5F2B5F2A5F275F275F265D255E255D254A25" + $"4A254925482748264827482B482B482C4A2D492D4A2D4C3A3F2D3C2D3C2D3D2D" + $"3E2B3E2C3E2B3E273E273E263C253D253C250A08BEA359BE3D593C5A415AC03B" + $"59BFD559434C404C06218A88888888C83E3F02484CC1D359C16D445A49C36B59" + $"C305C3CA50C5C8C50359C49D4C5A51C69B59C635C6FA50C8F8C83359C7CD545A" + $"59C9CB59C965CA6B4DCA6B4DCA804C5A4C584C584C574CC86D4DC8D34DC86D4D" + $"C73B524C534C524C504C504C4F4CC53D4DC5A34DC53D4DC40B4B4C0608EBECC0" + $"B64AC0B64AC11C4AC13349C14848C0F847C15E47C0F847C092C01648C02C47C0" + $"1648C00149C0504ABFEA4AC0504A0A04405E5E40402222400A0A000105180015" + $"01178600040A0001051815FF01178400040A030105000A0401051001157C0004" + $"0A000100381D1F001501178600040A000100381D1F15FF01178300040A010101" + $"201D1F0A020101301D1F01157E00040A0003020304381D1F15FF01178400040A" + $"0203020304281D1F15FF" +}; diff --git a/app-editors/qvim/licenses/Vim b/app-editors/qvim/licenses/Vim new file mode 100644 index 000000000..e445bcb9a --- /dev/null +++ b/app-editors/qvim/licenses/Vim @@ -0,0 +1,76 @@ +I) There are no restrictions on distributing unmodified copies of Vim except + that they must include this license text. You can also distribute + unmodified parts of Vim, likewise unrestricted except that they must + include this license text. You are also allowed to include executables + that you made from the unmodified Vim sources, plus your own usage + examples and Vim scripts. + +II) It is allowed to distribute a modified (or extended) version of Vim, + including executables and/or source code, when the following four + conditions are met: + 1) This license text must be included unmodified. + 2) The modified Vim must be distributed in one of the following five ways: + a) If you make changes to Vim yourself, you must clearly describe in + the distribution how to contact you. When the maintainer asks you + (in any way) for a copy of the modified Vim you distributed, you + must make your changes, including source code, available to the + maintainer without fee. The maintainer reserves the right to + include your changes in the official version of Vim. What the + maintainer will do with your changes and under what license they + will be distributed is negotiable. If there has been no negotiation + then this license, or a later version, also applies to your changes. + The current maintainer is Bram Moolenaar . If this + changes it will be announced in appropriate places (most likely + vim.sf.net, www.vim.org and/or comp.editors). When it is completely + impossible to contact the maintainer, the obligation to send him + your changes ceases. Once the maintainer has confirmed that he has + received your changes they will not have to be sent again. + b) If you have received a modified Vim that was distributed as + mentioned under a) you are allowed to further distribute it + unmodified, as mentioned at I). If you make additional changes the + text under a) applies to those changes. + c) Provide all the changes, including source code, with every copy of + the modified Vim you distribute. This may be done in the form of a + context diff. You can choose what license to use for new code you + add. The changes and their license must not restrict others from + making their own changes to the official version of Vim. + d) When you have a modified Vim which includes changes as mentioned + under c), you can distribute it without the source code for the + changes if the following three conditions are met: + - The license that applies to the changes permits you to distribute + the changes to the Vim maintainer without fee or restriction, and + permits the Vim maintainer to include the changes in the official + version of Vim without fee or restriction. + - You keep the changes for at least three years after last + distributing the corresponding modified Vim. When the maintainer + or someone who you distributed the modified Vim to asks you (in + any way) for the changes within this period, you must make them + available to him. + - You clearly describe in the distribution how to contact you. This + contact information must remain valid for at least three years + after last distributing the corresponding modified Vim, or as long + as possible. + e) When the GNU General Public License (GPL) applies to the changes, + you can distribute the modified Vim under the GNU GPL version 2 or + any later version. + 3) A message must be added, at least in the output of the ":version" + command and in the intro screen, such that the user of the modified Vim + is able to see that it was modified. When distributing as mentioned + under 2)e) adding the message is only required for as far as this does + not conflict with the license used for the changes. + 4) The contact information as required under 2)a) and 2)d) must not be + removed or changed, except that the person himself can make + corrections. + +III) If you distribute a modified version of Vim, you are encouraged to use + the Vim license for your changes and make them available to the + maintainer, including the source code. The preferred way to do this is + by e-mail or by uploading the files to a server and e-mailing the URL. + If the number of changes is small (e.g., a modified Makefile) e-mailing a + context diff will do. The e-mail address to be used is + + +IV) It is not allowed to remove this license from the distribution of the Vim + sources, parts of it or from a modified version. You may use this + license for previous Vim releases instead of the license that they came + with, at your option. diff --git a/app-editors/qvim/patches/qvim-8.0.197.patchset b/app-editors/qvim/patches/qvim-8.0.197.patchset new file mode 100644 index 000000000..8805dda10 --- /dev/null +++ b/app-editors/qvim/patches/qvim-8.0.197.patchset @@ -0,0 +1,40 @@ +From 49c4c5608f02d176b27e454de37677036abc8aab Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Thu, 21 Jun 2018 14:06:33 +0300 +Subject: Fix build on Haiku + + +diff --git a/src/Makefile b/src/Makefile +index 22c86ad..081302e 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -3382,10 +3382,8 @@ objects/channel.o: channel.c + Makefile: + @echo The name of the makefile MUST be "Makefile" (with capital M)!!!! + +-CCCTERM = $(CCC) -Ilibvterm/include -DINLINE="" \ +- -DVSNPRINTF=vim_vsnprintf \ +- -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \ +- -DWCWIDTH_FUNCTION=utf_uint2cells ++CCCTERM = $(CCC_NF) -Ilibvterm/include $(ALL_CFLAGS) -DINLINE="" \ ++ -DVSNPRINTF=vim_vsnprintf + + objects/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS) + $(CCCTERM) -o $@ libvterm/src/encoding.c +diff --git a/src/osdef1.h.in b/src/osdef1.h.in +index 5519104..9820c7b 100644 +--- a/src/osdef1.h.in ++++ b/src/osdef1.h.in +@@ -66,7 +66,9 @@ extern void memmove(char *, char *, int); + # endif + #endif + /* used inside of FD_ZERO macro: */ ++#ifndef __HAIKU__ + extern void bzero(void *, size_t); ++#endif + #ifdef HAVE_SETSID + extern pid_t setsid(void); + #endif +-- +2.16.4 + diff --git a/app-editors/qvim/qvim-8.0.197.recipe b/app-editors/qvim/qvim-8.0.197.recipe new file mode 100644 index 000000000..532fe44e4 --- /dev/null +++ b/app-editors/qvim/qvim-8.0.197.recipe @@ -0,0 +1,107 @@ +SUMMARY="An experimental Qt gui for Vim" +DESCRIPTION="Vim is a highly configurable text editor built to enable \ +efficient text editing. It is an improved version of the vi editor \ +distributed with most UNIX systems. + +Vim is often called a \"programmer's editor,\" and so useful for programming \ +that many consider it an entire IDE. It's not just for programmers, though. \ +Vim is perfect for all kinds of text editing, from composing email to editing \ +configuration files. +Despite this, Vim can be configured to work in a very simple (Notepad-like) \ +way, called evim or Easy Vim." +HOMEPAGE="https://github.com/equalsraf/vim-qt/" +COPYRIGHT="1991-2017 Bram Moleenar et al." +LICENSE="Vim" +REVISION="1" +COMMIT="162b3f3ae0fbe8d4a8e33a24f347e5daa4dd9826" +SOURCE_URI="https://github.com/equalsraf/vim-qt/archive/$COMMIT.tar.gz" +CHECKSUM_SHA256="347ba160b86d5263cb0952358fb29ccf5636cdc9d90aa110bedd6a4277c11280" +SOURCE_DIR="vim-qt-$COMMIT" +PATCHES="qvim-$portVersion.patchset" +ADDITIONAL_FILES="qvim.rdef.in" + +ARCHITECTURES="!x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + qvim$secondaryArchSuffix = $portVersion + cmd:ex$secondaryArchSuffix = $portVersion + cmd:gqvimtutor$secondaryArchSuffix = $portVersion + cmd:qvim$secondaryArchSuffix = $portVersion + cmd:qvimdiff$secondaryArchSuffix = $portVersion + cmd:qvimtutor$secondaryArchSuffix = $portVersion + cmd:rqvim$secondaryArchSuffix = $portVersion + cmd:rview$secondaryArchSuffix = $portVersion + cmd:view$secondaryArchSuffix = $portVersion + cmd:xxd$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libncurses$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libiconv$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + devel:libncurses$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:find + cmd:gcc$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + + cd src + runConfigure ./configure \ + --with-features=huge \ + --with-vim-name=qvim \ + --enable-gui=qt + + make $jobArgs +} + +INSTALL() +{ + make install + + # Make arrow keys, backspace, delete, etc behave as expected. + echo "set nocompatible" >> $dataDir/vim/vimrc + + # Workaround to get the themes and plugins work + echo "set runtimepath+=`finddir B_USER_SETTINGS_DIRECTORY`/vim" >> $dataDir/vim/vimrc + + + local APP_SIGNATURE="application/x-vnd.Qt5-Vim-8" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/qvim.rdef.in > qvim.rdef + + addResourcesToBinaries qvim.rdef $binDir/qvim + addAppDeskbarSymlink $binDir/qvim QVim +} + +TEST() +{ + cd src + make check +}