aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2015-02-09 02:52:47 +0800
committerpi <pi@FreeBSD.org>2015-02-09 02:52:47 +0800
commit64e93ee5d8cb506ae8d073a19a8383abf76e06cd (patch)
treed95e65097e3ab56793fd07f0b1e241d1f0d93ec2 /editors
parenta0634dda0abdb550b4bdca048734c2669754c401 (diff)
downloadfreebsd-ports-gnome-64e93ee5d8cb506ae8d073a19a8383abf76e06cd.tar.gz
freebsd-ports-gnome-64e93ee5d8cb506ae8d073a19a8383abf76e06cd.tar.zst
freebsd-ports-gnome-64e93ee5d8cb506ae8d073a19a8383abf76e06cd.zip
editors/sublime3: patch .desktop file and add check for /dev/shm link
PR: 197381 Submitted by: miguelmclara@gmail.com (maintainer)
Diffstat (limited to 'editors')
-rw-r--r--editors/sublime3/Makefile4
-rw-r--r--editors/sublime3/files/patch-sublime_text.desktop24
-rw-r--r--editors/sublime3/files/sublime.in15
3 files changed, 40 insertions, 3 deletions
diff --git a/editors/sublime3/Makefile b/editors/sublime3/Makefile
index d9a4ad73a2d4..7243a5333fa1 100644
--- a/editors/sublime3/Makefile
+++ b/editors/sublime3/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sublime
PORTVERSION= 3.0.65
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= editors linux
MASTER_SITES= http://c758482.r82.cf2.rackcdn.com/
PKGNAMEPREFIX= linux-
@@ -13,7 +13,7 @@ MAINTAINER= miguelmclara@gmail.com
COMMENT= Sublime Text is a sophisticated text editor for code, markup and prose
USES= tar:bzip2 desktop-file-utils
-INSTALLS_ICONS= yes
+INSTALLS_ICONS= yes
WRKSRC= ${WRKDIR}/sublime_text_3
CONFLICTS= linux-sublime-[0-24-9]*
diff --git a/editors/sublime3/files/patch-sublime_text.desktop b/editors/sublime3/files/patch-sublime_text.desktop
new file mode 100644
index 000000000000..d6a252db8dcf
--- /dev/null
+++ b/editors/sublime3/files/patch-sublime_text.desktop
@@ -0,0 +1,24 @@
+--- sublime_text.desktop.orig 2014-08-27
++++ sublime_text.desktop
+@@ -4,20 +4,9 @@
+ Name=Sublime Text
+ GenericName=Text Editor
+ Comment=Sophisticated text editor for code, markup and prose
+-Exec=/opt/sublime_text/sublime_text %F
++Exec=/usr/local/bin/sublime %F
+ Terminal=false
+ MimeType=text/plain;
+ Icon=sublime-text
+ Categories=TextEditor;Development;
+ StartupNotify=true
+-Actions=Window;Document;
+-
+-[Desktop Action Window]
+-Name=New Window
+-Exec=/opt/sublime_text/sublime_text -n
+-OnlyShowIn=Unity;
+-
+-[Desktop Action Document]
+-Name=New File
+-Exec=/opt/sublime_text/sublime_text --command new_file
+-OnlyShowIn=Unity;
diff --git a/editors/sublime3/files/sublime.in b/editors/sublime3/files/sublime.in
index 4687cded1cf1..aede3704b63a 100644
--- a/editors/sublime3/files/sublime.in
+++ b/editors/sublime3/files/sublime.in
@@ -1,2 +1,15 @@
#!/compat/linux/bin/sh
-%%DATADIR%%/sublime_text $*
+if [ -L "/dev/shm" ];then
+ %%DATADIR%%/sublime_text $*
+else
+ echo "Some Linux applications use shared memory.
+
+Sublime Text 3 can not function without it, you need to set up a link
+from /dev/shm to a suitable place, e.g. by adding the following line
+to /etc/devfs.conf (takes effect on each boot - restart devfs to apply
+then change now):
+ link /tmp shm
+"
+ exit 1;
+fi
+