mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge pull request #1129 from pchaigno/bitbake
Support of the BitBake language
This commit is contained in:
@@ -61,6 +61,14 @@ module Linguist
|
|||||||
@heuristic.call(data)
|
@heuristic.call(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
disambiguate "BitBake", "BlitzBasic" do |data|
|
||||||
|
if /^\s*; /.match(data) || data.include?("End Function")
|
||||||
|
Language["BlitzBasic"]
|
||||||
|
elsif /^\s*(# |include|require)\b/.match(data)
|
||||||
|
Language["BitBake"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
disambiguate "Objective-C", "C++", "C" do |data|
|
disambiguate "Objective-C", "C++", "C" do |data|
|
||||||
if (/@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data))
|
if (/@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data))
|
||||||
Language["Objective-C"]
|
Language["Objective-C"]
|
||||||
@@ -156,6 +164,14 @@ module Linguist
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
disambiguate "TypeScript", "XML" do |data|
|
||||||
|
if data.include?("<TS ")
|
||||||
|
Language["XML"]
|
||||||
|
else
|
||||||
|
Language["TypeScript"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
disambiguate "Frege", "Forth", "text" do |data|
|
disambiguate "Frege", "Forth", "text" do |data|
|
||||||
if /^(: |also |new-device|previous )/.match(data)
|
if /^(: |also |new-device|previous )/.match(data)
|
||||||
Language["Forth"]
|
Language["Forth"]
|
||||||
@@ -165,13 +181,5 @@ module Linguist
|
|||||||
Language["text"]
|
Language["text"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
disambiguate "TypeScript", "XML" do |data|
|
|
||||||
if data.include?("<TS ")
|
|
||||||
Language["XML"]
|
|
||||||
else
|
|
||||||
Language["TypeScript"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -281,6 +281,13 @@ Bison:
|
|||||||
- .y
|
- .y
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
|
BitBake:
|
||||||
|
type: programming
|
||||||
|
tm_scope: none
|
||||||
|
extensions:
|
||||||
|
- .bb
|
||||||
|
ace_mode: none
|
||||||
|
|
||||||
BlitzBasic:
|
BlitzBasic:
|
||||||
type: programming
|
type: programming
|
||||||
aliases:
|
aliases:
|
||||||
|
|||||||
25
samples/BitBake/gstreamer-libav.bb
Normal file
25
samples/BitBake/gstreamer-libav.bb
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
include gstreamer1.0-libav.inc
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
|
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
|
||||||
|
file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
|
||||||
|
file://gst-libs/ext/libav/LICENSE;md5=23a54f59b82572c203a559346e89ed57 \
|
||||||
|
file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
|
file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
|
||||||
|
file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
|
||||||
|
file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
||||||
|
|
||||||
|
SRC_URI = " \
|
||||||
|
http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
|
||||||
|
file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
|
||||||
|
"
|
||||||
|
SRC_URI[md5sum] = "86540dee14d31daf976eb2713f2294f3"
|
||||||
|
SRC_URI[sha256sum] = "585eb7971006100ad771a852e07bd2f3e23bcc6eb0b1253a40b5a0e40e4e7418"
|
||||||
|
|
||||||
|
LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
|
||||||
|
--cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
|
||||||
|
--ranlib='${RANLIB}' \
|
||||||
|
${GSTREAMER_1_0_DEBUG}"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/gst-libav-${PV}"
|
||||||
|
|
||||||
13
samples/BitBake/qtbase-native.bb
Normal file
13
samples/BitBake/qtbase-native.bb
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
require qt5-git.inc
|
||||||
|
require ${PN}.inc
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
# for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
||||||
|
# e.g. qt3d, qtwayland
|
||||||
|
ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
|
||||||
|
}
|
||||||
|
|
||||||
|
QT_MODULE_BRANCH = "release"
|
||||||
|
# v5.2.1 + 168 commits
|
||||||
|
SRCREV = "08cbbde61778276ccdda73d89fd64d02c623779f"
|
||||||
|
|
||||||
@@ -126,6 +126,13 @@ class TestHeuristcs < Test::Unit::TestCase
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_bb_by_heuristics
|
||||||
|
assert_heuristics({
|
||||||
|
"BitBake" => all_fixtures("BitBake"),
|
||||||
|
"BlitzBasic" => all_fixtures("BlitzBasic")
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
def assert_heuristics(hash)
|
def assert_heuristics(hash)
|
||||||
candidates = hash.keys.map { |l| Language[l] }
|
candidates = hash.keys.map { |l| Language[l] }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user